- A A reference is a type of pointer
- B A pointer can be reassigned to point to a different memory location, while a reference cannot
- C A reference must be initialized when it is declared, while a pointer does not have to be
- D A pointer is a copy of the value it points to, while a reference is an alias for the value it refers to
- Share this MCQ
Answer:
B
Share this MCQ
Answer: B
Explanation: In C++, a pointer can be reassigned to point to a different memory location, while a reference always refers to the same object throughout its lifetime. Additionally, a reference must be initialized when it is declared, while a pointer can be declared without initialization.
Click me to Read more Question & Answer of Pointer in C LanguageShare this MCQ