

MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
A()?$ |
A. | B() |
B. | C() |
C. | Can’t be determined |
Answer» C. Can‚Äö√Ñ√∂‚àö√ë‚àö¬•t be determined | |
2. |
If the object is passed by value to a copy constructor:$ |
A. | Only public members will be accessible to be copied |
B. | That will work normally |
C. | Compiler will give out of memory error |
D. | Data stored in data members won’t be accessible |
Answer» B. That will work normally | |
3. |
Which among the following is true for copy constructor?$ |
A. | The argument object is passed by reference |
B. | It can be defined with zero arguments |
C. | Used when an object is passed by value to a function |
D. | Used when a function returns an object |
Answer» D. Used when a function returns an object | |
4. |
Which among the following helps to create a temporary instance? |
A. | Implicit call to a default constructor |
B. | Explicit call to a copy constructor |
C. | Implicit call to a parameterized constructor |
D. | Explicit call to a constructor |
Answer» B. Explicit call to a copy constructor | |
5. |
s1 then s2 then s3 |
A. | s3 then s2 then s1 |
B. | s2 then s3 then s1 |
C. | All are created at same time |
Answer» D. | |
6. |
If a programmer defines a class and defines a default value parameterized constructor inside it. |
A. | |
B. | It will not create the object (as parameterized constructor is used) |
C. | It will create the object (as the default arguments are passed ) |
Answer» C. It will create the object (as the default arguments are passed ) | |