

MCQOPTIONS
Saved Bookmarks
This section includes 8 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. | 7 |
B. | 16 |
C. | 15.05 |
D. | 61.15 |
E. | Compilation Error |
Answer» F. | |
2. |
What is the output of this program?
|
A. | 10 50.36 |
B. | 50.36 10 |
C. | 10 50 |
D. | All of above |
E. | None of these |
Answer» B. 50.36 10 | |
3. |
What is the output of the following program?
|
A. | 10 3 |
B. | 30.0 10.0 |
C. | 30 3 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
4. |
What are the advantages of passing arguments by reference? |
A. | There is no need to call constructors for parameters (i.e. faster) |
B. | Changes to parameter values within the function also affect the original arguments. |
C. | There is need to copy parameter values (i.e. less memory used) |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
5. |
Which of the following permits function overloading on c++? |
A. | type & number of arguments |
B. | number of arguments |
C. | type |
D. | All of above |
E. | None of these |
Answer» B. number of arguments | |
6. |
When our function doesn t need to return anything means what will we use/send as parameter in function? |
A. | blank space |
B. | void |
C. | both blank space & void |
D. | All of above |
E. | None of these |
Answer» B. void | |
7. |
What will happen while using pass by reference |
A. | The location of variable in memory is passed to the function so that it can use the same memory area for its processing |
B. | The function declaration should contain ampersand (& in its type declaration) |
C. | The values of those variables are passed to the function so that it can manipulate them |
D. | All of above |
E. | None of these |
Answer» B. The function declaration should contain ampersand (& in its type declaration) | |
8. |
Overloaded functions are |
A. | Two or more functions with the same name but different number of parameters or type |
B. | Very long functions that can hardly run |
C. | One function containing another one or more functions inside it |
D. | All of above |
E. | None of these |
Answer» B. Very long functions that can hardly run | |