MCQ - References in C++ Programming

21.Which value can we not assign to reference?

A. Integer
B. Floating
C. Unsigned
D. Null

View Answer


22.The terms lvalue and rvalue is referred to the things that appears on

A. The left side of assignments
B. The right side of assignments
C. The end of program
D. Both A and B

View Answer


23.Which of the following statements is correct?
i) Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
ii) A reference is not a constant pointer.

A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Both 1 and 2 are incorrect.

View Answer


24.Which of the following statements is correct?
i) Change a reference changes the referent.
ii) We can create an array of references.

A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Both 1 and 2 are incorrect.

View Answer


25.Which of the following statement is correct?

A. A referenced has to be de-referenced to access a value.
B. A referenced does not need to be de-referenced to access a value.
C. A referenced has to be double de-referenced to access a value.
D. Whether a reference should be de-referenced or not depends on the type of the reference.

View Answer






Also check :


Discussion


* You must be logged in to add comment.