

MCQOPTIONS
Saved Bookmarks
This section includes 25 Mcqs, each offering curated multiple-choice questions to sharpen your C++ Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the output of this program?
|
A. | Program Executed... |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage value |
E. | None of these |
Answer» B. Compilation Error | |
2. |
What is the output of this program?
|
A. | 5 |
B. | 3 |
C. | 13 |
D. | Compilation Error |
E. | Random number |
Answer» F. | |
3. |
What will happen in this code?
|
A. | ptr now points to m |
B. | m is assigned to n |
C. | ptr0 now points to n |
D. | n is assigned to m |
E. | None of these |
Answer» B. m is assigned to n | |
4. |
What is the output of this program?
|
A. | 40 |
B. | 15 |
C. | 60 |
D. | 17 |
E. | 48 |
Answer» F. | |
5. |
What is the output of this program?
|
A. | 12,21,35,14,53, |
B. | 35,14,53, |
C. | 14,53, |
D. | 12,21,35,14 |
E. | 12,21 |
Answer» B. 35,14,53, | |
6. |
What is the output of this program?
|
A. | 40 |
B. | 15 |
C. | 23 |
D. | 71 |
E. | Address of arr |
Answer» F. | |
7. |
What is the output of this program?
|
A. | Address of sting "Interview Mania" |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage Value |
E. | Interview Mania |
Answer» B. Compilation Error | |
8. |
What is the output of this program?
|
A. | 10 |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage value |
E. | None of these |
Answer» B. Compilation Error | |
9. |
What is the output of this program?
|
A. | Interview Mania |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage value |
E. | None of these |
Answer» B. Compilation Error | |
10. |
What is the output of this program?
|
A. | 11 |
B. | 3 |
C. | 311 |
D. | 113 |
E. | None of these |
Answer» D. 113 | |
11. |
What is the output of this program?
|
A. | 45 |
B. | 12 |
C. | 13 |
D. | 10 |
E. | None of these |
Answer» B. 12 | |
12. |
What is the meaning of the following declaration?
|
A. | p is pointer to function |
B. | p is pointer to such function which return type is array |
C. | p is pointer to array of function |
D. | p is array of pointer to function |
E. | None of these |
Answer» E. None of these | |
13. |
What is the output of this program?
|
A. | 11 |
B. | 10 |
C. | 12 |
D. | 13 |
E. | Compilation Error |
Answer» F. | |
14. |
What is the output of this program?
|
A. | N66 |
B. | 6N6 |
C. | 66N |
D. | 126 |
E. | None of these |
Answer» B. 6N6 | |
15. |
What is the output of this program?
|
A. | InterviewMania |
B. | Mania |
C. | Interview |
D. | viewMania |
E. | None of these |
Answer» E. None of these | |
16. |
What will happen in this code? |
A. | ptr now points to m |
B. | m is assigned to n |
C. | ptr0 now points to n |
D. | n is assigned to m |
E. | None of these |
Answer» B. m is assigned to n | |
17. |
The void pointer can point to which type of objects? |
A. | float |
B. | double |
C. | int |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
18. |
What we can t do on a void pointer? |
A. | pointer functions |
B. | pointer arithmetic |
C. | Both A and B |
D. | pointer static |
E. | None of these |
Answer» C. Both A and B | |
19. |
To which does the function pointer point to? |
A. | absolute variables |
B. | variable |
C. | constants |
D. | function |
E. | None of these |
Answer» E. None of these | |
20. |
which of the following can be passed in function pointers? |
A. | functions |
B. | variables |
C. | data types |
D. | All of above |
E. | None of these |
Answer» B. variables | |
21. |
What is the mandatory part to present in function pointers? |
A. | return values |
B. | data types |
C. | & |
D. | All of above |
E. | None of these |
Answer» C. & | |
22. |
Which is referred by pointers to member? |
A. | Non-static members of class objects |
B. | Referring to whole class |
C. | static members of class objects |
D. | All of above |
E. | None of these |
Answer» B. Referring to whole class | |
23. |
Which one of the following is not a possible state for a pointer. |
A. | point to a tye |
B. | zero |
C. | point one past the end of an object |
D. | hold the address of the specific object |
E. | None of these |
Answer» B. zero | |
24. |
Which is the best design choice for using pointer to member function? |
A. | Class |
B. | Structure |
C. | Interface |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
25. |
What is the operation for .*? |
A. | It reduces the data size |
B. | It combines the first operand and the second operand |
C. | It separates the first operand and the second operand |
D. | All of above |
E. | None of these |
Answer» C. It separates the first operand and the second operand | |