

MCQOPTIONS
Saved Bookmarks
This section includes 44 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. | 93 |
B. | 15 |
C. | 13 |
D. | 6 |
E. | None of these |
Answer» B. 15 | |
2. |
What is the output of this program?
|
A. | 7 |
B. | 9 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
3. |
What is the output of this program?
|
A. | 8 64 |
B. | 8 48 |
C. | 64 8 48 |
D. | 8 64 8 48 |
E. | None of these |
Answer» E. None of these | |
4. |
What is the output of this program?
|
A. | 9,9 |
B. | 3,4 |
C. | 6,5 |
D. | Compilation Error |
E. | None of these |
Answer» B. 3,4 | |
5. |
What is the output of this program?
|
A. | 6 12 |
B. | 6 |
C. | 12 |
D. | 6 4 |
E. | 12 6 |
Answer» B. 6 | |
6. |
What is the output of this program?
|
A. | 10 |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage Value |
E. | None of these |
Answer» C. Runtime Error | |
7. |
What is the output of this program?
|
A. | Compilation Error |
B. | Runtime Error |
C. | Converted... |
D. | Garbage value |
E. | None of these |
Answer» D. Garbage value | |
8. |
What is the output of this program?
|
A. | 2.0 |
B. | 5.0 |
C. | 5.38516 |
D. | 5.38516 5.38516 |
E. | None of these |
Answer» E. None of these | |
9. |
What is the output of this program?
|
A. | 6 |
B. | 5 |
C. | 11 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
10. |
What is the output of this program?
|
A. | 20 23 |
B. | 23.9399 |
C. | 20.23 |
D. | 23 20 |
E. | None of these |
Answer» E. None of these | |
11. |
What is the output of this program?
|
A. | Compilation Error |
B. | False |
C. | Runtime Error |
D. | True |
E. | None of these |
Answer» E. None of these | |
12. |
What is the output of this program?
|
A. | 3 |
B. | Compilation Error |
C. | Runtime Error |
D. | Garbage value |
E. | 5 |
Answer» F. | |
13. |
What is the output of this program?
|
A. | num1: 5, num2: 3 |
B. | num1: 3, num2: 5 |
C. | num1: 6, num2: 5 |
D. | Compilation Error |
E. | None of these |
Answer» B. num1: 3, num2: 5 | |
14. |
What is the output of this program?
|
A. | 5 |
B. | 15 |
C. | 35 |
D. | 7 |
E. | 80 |
Answer» F. | |
15. |
What is the output of this program?
|
A. | 15 |
B. | 10 |
C. | 6 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
16. |
What is the output of this program?
|
A. | 12.93099 11.120 |
B. | 11.120 12.93099 |
C. | 11 12 |
D. | 12 11 |
E. | None of these |
Answer» E. None of these | |
17. |
What is the output of this program?
|
A. | 10 12 |
B. | 12 10 |
C. | 11 11 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
18. |
What is the output of this program?
|
A. | 16 |
B. | 15 |
C. | 14 |
D. | Compilation Error |
E. | None of these |
Answer» C. 14 | |
19. |
What is the output of this program?
|
A. | 15 10 0 30 35 |
B. | 35 30 15 10 0 |
C. | 0 10 15 30 35 |
D. | 0 15 10 35 30 |
E. | 15 10 35 30 0 |
Answer» F. | |
20. |
What is the output of this program?
|
A. | Interview Interview Mania |
B. | Interview Mania |
C. | Mania |
D. | Compilation Error |
E. | None of these |
Answer» B. Interview Mania | |
21. |
What is the output of this program?
|
A. | 105 |
B. | 99 |
C. | 12 |
D. | 1010 |
E. | 112 |
Answer» F. | |
22. |
What is the output of this program?
|
A. | 7 9 |
B. | 9 7 |
C. | 9 |
D. | 7 |
E. | None of these |
Answer» B. 9 7 | |
23. |
What is the output of this program?
|
A. | 5 4 5 |
B. | 5 5 4 |
C. | 4 5 5 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
24. |
What is the output of this program?
|
A. | 7 |
B. | 3 |
C. | 17 |
D. | 18 |
E. | None of these |
Answer» E. None of these | |
25. |
Which concepts does the Pre Increment use? |
A. | queue |
B. | call by value |
C. | call by reference |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
26. |
How many types are there in increment/decrement operator? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
27. |
Which operator works only with integer variables? |
A. | modulus |
B. | decrement |
C. | increment |
D. | both decrement & increment |
E. | None of these |
Answer» E. None of these | |
28. |
What do we need to use when we have multiple subscripts? |
A. | operator |
B. | operator() |
C. | operator[]. |
D. | All of above |
E. | None of these |
Answer» C. operator[]. | |
29. |
What do we need to do to pointer for overloading the subscript operator? |
A. | store it in heap |
B. | reference pointer |
C. | dereference pointer |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
30. |
subscript operator is used to access which elements? |
A. | char |
B. | array |
C. | string |
D. | All of above |
E. | None of these |
Answer» C. string | |
31. |
Which operator is having the highest precedence in c++? |
A. | dynamic_cast |
B. | static_cast |
C. | array subscript |
D. | Scope resolution operator |
E. | None of these |
Answer» E. None of these | |
32. |
What is the name of | operator? |
A. | or |
B. | and |
C. | modulus |
D. | sizeof |
E. | None of these |
Answer» B. and | |
33. |
What is the associativity of add(+); |
A. | left to right |
B. | Top to bottom |
C. | right to left |
D. | both Top to bottom & right to left |
E. | None of these |
Answer» B. Top to bottom | |
34. |
Pick out the compound assignment statement. |
A. | p = p / q |
B. | p -= 6 |
C. | p = p 6 |
D. | All of above |
E. | None of these |
Answer» C. p = p 6 | |
35. |
In which direction does the assignment operation will take place? |
A. | top to bottom |
B. | left to right |
C. | right to left |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
36. |
What are the essential operators in c++? |
A. | <= |
B. | + |
C. | | |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
37. |
Pick out the correct syntax of operator conversion. |
A. | operator float() |
B. | operator const |
C. | operator float()const |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
38. |
How are types therein user-defined conversion? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
39. |
How many parameters does a conversion operator may take? |
A. | as many as possible |
B. | 3 |
C. | 2 |
D. | 1 |
Answer» F. | |
40. |
Why we use the dynamic_cast type conversion? |
A. | to be used in low memory |
B. | result of the type conversion is an invalid |
C. | result of the type conversion is a valid |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
41. |
What is the return type of the conversion operator? |
A. | no return type |
B. | float |
C. | int |
D. | void |
E. | None of these |
Answer» B. float | |
42. |
Operator overloading is |
A. | adding operation to the existing operators |
B. | making the new operator |
C. | making c++ operator works with objects |
D. | giving new meaning to existing operator |
E. | None of these |
Answer» B. making the new operator | |
43. |
Which of the following operators can t be overloaded? |
A. | []. |
B. | |
C. | + |
D. | :: |
E. | None of these |
Answer» E. None of these | |
44. |
Which operator is having the right to left associativity in the following? |
A. | Type cast |
B. | Function call |
C. | Function call |
D. | Array subscripting |
E. | None of these |
Answer» B. Function call | |