click below
click below
Normal Size Small Size show me how
Data Structures
Pointers and Array-Based Lists
| Question | Answer |
|---|---|
| Pointer variables contain | The addresses of other variables as their values |
| In C++ no name is associated with | the pointer data type. |
| A pointer variable is declared using an asterisk between | the data type and the variable. |
| In C++, & is called | the address of operator |
| The address of operator returns the address | of its operand. |
| If p is a pointer variable of type int and num is an int variable the statement p = # | sets the value of p to the address of num. |
| When used as a unary operator, * is called the | dereferencing operator |
| The memory location indicated by the value of a pointer variable is accessed by | using the dereferencing operator, *. |
| if p is a pointer variable of type int, the statement *p = 25; | sets the value of the memory location indicated by the value of p to 25. |
| You can use the member access operator arrow _>, |