MULTIPLE CHOICE QUESTIONS AND ANSWERS
- True/False: The ampersand (&) is used to dereference a pointer variable in C++.
Answer: False
- When the ___________ is present in front of a variable name, it represents the address of that variable.
- asterisk ( * )
- conditional operator
- ampersand ( & )
- semicolon ( ; )
- None of these
Answer: (c)
- A pointer variable may be initialized with
- any non-zero integer value
- any address in the computer's memory
- the address of an existing variable
- a and c only
- None of these
Answer: (b)
- A pointer variable is designed to store ________.
- any legal C++ value
- only floating-point values
- a memory address
- a float value
- None of these
Answer (c)
- We should use the delete operator for objects that were ________.
- never used
Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.