

MCQOPTIONS
Saved Bookmarks
This section includes 20 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. | Compilation Error |
B. | N :: operator delete |
C. | M :: operator delete |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
2. |
What is the output of this program?
|
A. | Bye |
B. | Bye Bye Bye |
C. | Bye Bye Bye Bye Bye |
D. | Bye Bye |
E. | Bye Bye Bye Bye |
Answer» D. Bye Bye | |
3. |
What is the output of this program?
|
A. | Compilation Error |
B. | Interveiw |
C. | Mania |
D. | Interveiw Mania |
E. | None of these |
Answer» E. None of these | |
4. |
What is the output of this program?
|
A. | 11 11 |
B. | 11 11 14 |
C. | 11 11 14 14 15 15 |
D. | 14 15 15 |
E. | 14 15 |
Answer» D. 14 15 15 | |
5. |
What is the output of this program?
|
A. | Compilation Error |
B. | Segmentation fault |
C. | Free store addr |
D. | Runtime Error |
E. | None of these |
Answer» C. Free store addr | |
6. |
What is the output of this program?
|
A. | AJIT KUMAR GUPTA |
B. | Ajit Kumar Gupta |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» B. Ajit Kumar Gupta | |
7. |
What will the monetary facet will do? |
A. | Parsing of character values |
B. | Handle formatting and parsing of monetary values |
C. | Handle formatting and parsing of character values |
D. | All of above |
E. | None of these |
Answer» C. Handle formatting and parsing of character values | |
8. |
What kind of locale does every program is having in C++? |
A. | temp locale |
B. | local locale |
C. | global locale |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
9. |
What is the main feature of locale in C++? |
A. | Portability |
B. | Reliability |
C. | Sustainability |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
10. |
What is the correct syntax for declaring an allocator? |
A. | template < class T > class; |
B. | template class allocator; |
C. | template < class T > class allocator; |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
11. |
What is the use of reference member type in allocator? |
A. | Reference to an element |
B. | Point to an element |
C. | Quantities of element |
D. | All of above |
E. | None of these |
Answer» B. Point to an element | |
12. |
Which header file is used to manipulate the allocater? |
A. | object |
B. | allocater |
C. | memory |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
13. |
Which operator is used to deallocate the memory? |
A. | free |
B. | empty |
C. | destroy |
D. | All of above |
E. | None of these |
Answer» B. empty | |
14. |
Which operator is used to allocate the memory? |
A. | free |
B. | = |
C. | + |
D. | new |
E. | None of these |
Answer» E. None of these | |
15. |
Where are allocators implemented? |
A. | Standard library |
B. | C++ code library |
C. | Template library |
D. | All of above |
E. | None of these |
Answer» B. C++ code library | |
16. |
Which is used to allocate and deallocate storage for objects during the execution? |
A. | Freestore |
B. | Stack |
C. | Heap |
D. | All of above |
E. | None of these |
Answer» B. Stack | |
17. |
Which is used to pass the large objects in c++? |
A. | pass by reference |
B. | pass by value |
C. | both reference & pass by value |
D. | function |
E. | None of these |
Answer» B. pass by value | |
18. |
Where are allocators used? |
A. | Used for pointers |
B. | Allocation of memory |
C. | Deallocation of memory |
D. | Both Allocation & Deallocation of memory |
E. | None of these |
Answer» E. None of these | |
19. |
How can object be allocated outside the object lifetime? |
A. | float |
B. | void* |
C. | int |
D. | All of above |
E. | None of these |
Answer» C. int | |
20. |
What must be an operand of operator delete? |
A. | Array |
B. | Stack |
C. | Pointer |
D. | All of above |
E. | None of these |
Answer» D. All of above | |