

MCQOPTIONS
Saved Bookmarks
This section includes 28 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. | 2 |
B. | 150 |
C. | Compilation Error |
D. | 300 |
E. | Runtime Error |
Answer» E. Runtime Error | |
2. |
What is the output of this program?
|
A. | 250 |
B. | 5.225 |
C. | 5.225 250 |
D. | 250 5.225 |
E. | None of these |
Answer» E. None of these | |
3. |
What is the output of this program?
|
A. | 1.25 |
B. | 5.96046 |
C. | 1.25 5.96046 |
D. | 5.96046 1.25 |
E. | None of these |
Answer» E. None of these | |
4. |
What is the output of this program?
|
A. | 4: |
B. | 4: 16BB: |
C. | 16BB: |
D. | 16BB: 4: |
E. | None of these |
Answer» C. 16BB: | |
5. |
What is the output of this program?
|
A. | 10 out of 8 |
B. | 8 |
C. | 10 |
D. | 8 out of 10 |
E. | None of these |
Answer» E. None of these | |
6. |
What is the output of this program?
|
A. | template |
B. | class |
C. | Interveiw |
D. | Mania |
E. | None of these |
Answer» E. None of these | |
7. |
What is the output of this program?
|
A. | 250 |
B. | 150 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» B. 150 | |
8. |
What is the output of this program?
|
A. | True |
B. | False |
C. | Runtime Error |
D. | Compilation Error |
E. | None of these |
Answer» C. Runtime Error | |
9. |
What is the output of this program?
|
A. | 164AA |
B. | AA416 |
C. | 416AA |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
10. |
What is the output of this program?
|
A. | I |
B. | Love |
C. | Interview |
D. | Mania |
E. | I Love Interview Mania |
Answer» F. | |
11. |
What is the output of this program?
|
A. | Compilation Error |
B. | Runtime Error |
C. | Garbage Value |
D. | L |
E. | None of these |
Answer» E. None of these | |
12. |
What is the output of this program?
|
A. | 50 |
B. | 150 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
13. |
Which of the following is correct about templates? |
A. | It is a type of compile time polymorphism |
B. | It allows the programmer to write one code for all data types |
C. | Helps in generic programming |
D. | All of the mentioned |
Answer» E. | |
14. |
Which of the following is used for generic programming? |
A. | Virtual functions |
B. | Modules |
C. | Templates |
D. | Abstract Classes |
Answer» D. Abstract Classes | |
15. |
How many kinds of parameters are there in C++? |
A. | 3 |
B. | 2 |
C. | 1 |
D. | All of above |
E. | None of these |
Answer» B. 2 | |
16. |
Which is dependant on template parameter? |
A. | method |
B. | base class |
C. | abstract class |
D. | All of above |
E. | None of these |
Answer» C. abstract class | |
17. |
What is another name of full specialization? |
A. | function overloading template |
B. | explicit specialization |
C. | implicit specialization |
D. | All of above |
E. | None of these |
Answer» C. implicit specialization | |
18. |
How many types of specialization are there in c++? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
19. |
What is a function template? |
A. | creating a function with having a exact type |
B. | all of the mentioned |
C. | creating a function without having to specify the exact type |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
20. |
How many parameters are legal for non-type template? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» B. 3 | |
21. |
What may be the name of the parameter that the template should take? |
A. | same as class |
B. | same as function |
C. | same as template |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
22. |
Which are done by compiler for templates? |
A. | code elimination |
B. | type-safe |
C. | portability |
D. | All of above |
E. | None of these |
Answer» C. portability | |
23. |
What is meant by template parameter? |
A. | It can be used to evaluate a type |
B. | It can of no return type |
C. | It can be used to pass a type as argument |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
24. |
From where does the template class derived? |
A. | templated class |
B. | regular non-templated C++ class or templated class |
C. | regular non-templated C++ class |
D. | All of above |
E. | None of these |
Answer» C. regular non-templated C++ class | |
25. |
What can be passed by non-type template parameters during compile time? |
A. | constant expression |
B. | float |
C. | int |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
26. |
Which of the things does not require instantiation? |
A. | member class |
B. | functions |
C. | non virtual member function |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
27. |
Which parameter is legal for non-type template? |
A. | object |
B. | class |
C. | pointer to member |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
28. |
Why we use :: template-template parameter? |
A. | class |
B. | rebinding |
C. | binding |
D. | both binding & rebinding |
E. | None of these |
Answer» E. None of these | |