MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your C++ (MCQ) questions and answers knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Inline functions may not work ______ .1. If function contain static variables.2. If function contain global and register variables.3. If function returning value consists looping construct(i.e. for, while).4. If inline functions are recursive.5. If function contains const value. |
| A. | Only 1,4,5 |
| B. | Only 2,3,5 |
| C. | Only 1,3,4 |
| D. | All of these |
| Answer» D. All of these | |
| 2. |
Which of the followings is/are not false about friend function ?1. It can be called / invoked with class object.2. It has objects as arguments.3. It can have built-in types as arguments.4. It must declared only in public part of a class.5. It does not have this pointer as an argument. |
| A. | Only 2,4 |
| B. | Only 1,2,5 |
| C. | Only 2,3,5 |
| D. | All of these |
| Answer» D. All of these | |
| 3. |
Predict the output:float x= 3.1496;cout |
| A. | 3.14 |
| B. | 3.15 |
| C. | 3.00 |
| D. | None of these |
| Answer» E. | |