1. Home
  2. Computer Science MCQs
  3. C++ and Object-Oriented Programming
  4. Which statement about a C++ reference is correct?

Added 30 Nov -0001

Which statement about a C++ reference is correct?

  1. It can be left uninitialised
  2. It can be reassigned to another variable later
  3. It stores a copy of the object
  4. It must be initialised and cannot be rebound Correct answer

Correct answer

D. It must be initialised and cannot be rebound

17 views

MCQSEXAM

Explanation

A reference is an alias that must be bound at declaration and cannot be rebound afterwards.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C++ and Object-Oriented Programming MCQs

Practise all C++ and Object-Oriented Programming MCQs

Similar MCQs