1.

Pick the correct statement about references.(a) References can be assigned value NULL(b) References once assigned cannot be changed to refer another variable(c) Reference should not be initialized when created(d) Reference is the same as pointersThis question was posed to me during an online exam.This interesting question is from References in section Types, Pointers, Arrays & Structures in C++ of C++

Answer»

The correct option is (b) References once ASSIGNED cannot be changed to refer another variable

Easy EXPLANATION - References are should be initialized during its creation and once assigned cannot be changed to refer another variable. References cannot be assigned NULL value. References and POINTERS are TWO DIFFERENT concepts.



Discussion

No Comment Found

Related InterviewSolutions