Practice Problems 6
[Return to Math 10 Homepage]
Practice Problems 6
- What is the meaning of "overloading" a function?
- What is a benefit of using dynamically allocated arrays
in a program rather than declaring them statically?
- Re-write the following assignment statement using the
"pointer" notation for arrays rather than the "bracket" (subscript)
notation:
a) a[i+1] = b;
b) c = a[0] + a[i];
- What is the delete operator do (e.g., when it is
used with an array dynamically allocated)?
- What is a "template" and why would one want to use one?
- What is "assembly language"?
- Translate the following "assembler" code into a simple C++ assigment
statement:
LOAD A
ADD B
MULT C
STOR D
- Translate the following C++ assignment statement into code for a
"stack machine."
d = a + b * c;
- Rewrite the code for the stack function push based on
an underlying data structure of an array so that the underlying
data structure is now a linked list.
For answers, try this link.
This page is maintained by Dennis C. Smolarski, S.J.
dsmolarski@math.scu.edu
© Copyright 1998 Dennis C. Smolarski, SJ, All rights reserved.
Last changed: 5 December 1998.