What is the difference between a reference and a pointer in C++?
- A A reference must be initialised, cannot be null and cannot be reseated
- B A reference can be null
- C A pointer must be initialised at declaration
- D There is no practical difference
Answer
A reference must be initialised, cannot be null and cannot be reseated
A reference is not inherently safe, however. It can still dangle if the referenced object is destroyed while the reference remains in scope.





