C++ Programming Multiple Choice Questions - References

This section focuses on the "References" in C++ programming langauge. These Multiple Choice Questions (MCQ) should be practiced to improve the C++ programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1.Reference is like a?

A. Pointer
B. Structure
C. Array
D. None of above

View Answer


2. A References is :

A. A variable that holds memory address.
B. A Alias to an existing variable.
C. Alias to an existing variable and holds memory address.
D. None of the above

View Answer


3. A variable can be declared as reference by putting _______ in the declaration.

A. #
B. $
C. &
D. *

View Answer


4. If a function receives a reference to a variable, can it modify the value of the variable?

A. Yes
B. No
C. We can not pass reference to a variable.
D. Reference can not contain function.

View Answer


5. Through references we can avoid?

A. wastage of memory
B. wastage of CPU time
C. Both A and B
D. None of the above

View Answer


6. References can be NULL?

A. References has constant value 0.
B. References has constant value \0.
C. Yes.
D. No.

View Answer


7. How many objects reference can refer during its lifetime?

A. 1
B. 2
C. 3
D. 4

View Answer


8. Dereference operator is also called as

A. pointer
B. Reference operator
C. Offset operator
D. Deoffset operator

View Answer


9. Which operator is used to de-references to an object?

A. #
B. &
C. *
D. None of the above

View Answer


10. Which of the following is an advantage of reference?

A. Safer
B. Easier to use
C. Time consuming
D. Both A and B

View Answer






Also check :


Discussion


* You must be logged in to add comment.