MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How many loops are there in C++ 98? |
| A. | 2 |
| B. | 3 |
| C. | 4 |
| D. | 5 |
| E. | |
| Answer» C. 4 | |
| 2. |
Which of the following operators cannot be overloaded ? |
| A. | Static function |
| B. | Virtual function |
| C. | Const function |
| D. | Operator function |
| Answer» E. | |
| 3. |
Reusability is a desirable feature of a language as it |
| A. | Decreases the testing time |
| B. | Reduces the compilation time |
| C. | Lowers the maintenance cost |
| D. | Both A and C |
| Answer» E. | |
| 4. |
#include <iostream>using namespace std;class course{ char name[10]; public : void lfc() { cout<< name; }}; 15.A private function of a derived class can be accessed by the parent class. |
| A. | TRUE |
| B. | FALSE |
| C. | May Be |
| D. | Can't Say |
| Answer» C. May Be | |
| 5. |
#include <iostream>using namespace std;class course{ int member; public : int* lfc() { return & member; }};main(){course s;int *ptr=s.lfc();return 0;} 13.In a class, encapsulating an object of another class is called |
| A. | Encapsulation |
| B. | Inheritance |
| C. | Composition |
| D. | None of the above |
| Answer» D. None of the above | |