Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the difference between a reference and a pointer in C++?

  1. A A reference must be initialised, cannot be null and cannot be reseated
  2. B A reference can be null
  3. C A pointer must be initialised at declaration
  4. 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.

All C++ MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as