- A pointer variable can store __________ .
- In order to determine the address of a variable in C++, we can use the __________ operator.
- Pointer variables must always be __________ before they are used.
- In order to follow a pointer and access the data it is pointing to, we must __________ the pointer using the __________ operator.
- Pointer can be used to dynamically allocate storage from the __________ at __________.
- When using raw pointers and dynamica storage allocation, we must always de-allocate the used storage by using __________ to prevent __________.
- __________ and pointers can be used interchangeably in many contexts.
- What types of variables can ptr store given the following declaraion below?
int **ptr;
- What does the following code snippet display?
int *data = new int[5];
for (int i=0; i<5; i++)
*(data + i) = i*2;
for (int i=0; i<4; i++)
cout << data[i] << " ";
cout << endl;
delete [] data;
- Given the following pointer decalrations, what can you say about ptr1 and ptr2?
int *ptr1;
int *ptr2 {nullptr};