Font size
WorksheetsPDS - 04225 Pointers & Dynamic Arrays - Chapter 8
Total questions: 10
Worksheet time: 6mins
C++ pointers are
Memory locations
always int data type
objects that do not require data type
Variables that point at other variables
C++ Pointer variables contain
Integer values
addresses of locations in memory
hexadecimal numbers
None of the above
In C++ the heap is
A special C++ library that controls the memory
A special variable
An amorphous block of memory that your program can access as necessary.
An perfect block of memory that your program can access as necessary.
In C++ the Memory is broken into individual bytes with each byte carrying it’s own:
Values
Pointers
Scope
Address
The heap is:
Symmetric storage
a special variable
A block of memory that is controlled by the programmer
A block of memory that is controlled by the compiler
What are 2 typical problems with fixed array sizes?.
Exceeding the maximum
Use of For Loops
Use of indexes to access the array
No expansion
What do you use the "new" command in C++ for?.
Create new object
De-reference memory locations
Allocate heap memory
Create arrays
What does this command do?.
Creates a pointer of type integer that is initially pointing to null.
Creates a pointer of type integer that is initially pointing to 0.
Creates a pointer in the heap
None of the answers are valid
In C++ what the following command does: delete [ ] a;
Nothing
Creates a new array names a of type delete.
Deletes a variable
Free memory allocated for the a array
Do you have to reset a pointer after delete?.
Yes
No
