Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1.

C++ was originally developed by (a) Nicolas Wirth (b) Donald Knuth (c) Bjarne Stroustrup (d)Ken Thompson 2. The preprocessor directive #include is required if (a) Console output is used Console (b) input is used (c) Both console input and output is used (d) None of these 3. The operator << is called (a) an insertion operator (b) put to operator (c) either a or b (d) None of these 4. The operator >> is called (a) an extraction operator (b) a get from operator (c) either a or b (d) get to operator 5. When a language has the capability to produce new data type, it is called (a) Extensible (b) Overloaded (c) Encapsulated (d) Reprehensible 6. C++ name was suggested by (a) Rrick Mascitti (b) Bjarne Stroustrup (c) Donald Knuth (d) Ken Thompson 7.What is a reference? (a) an operator (b) a reference is an alias for an object (c) used to rename an object (d) None of these 8.A constructor is called whenever (a)an object is declared (b)an object is used (c) a class is declared (d) a class is used 9.State the object oriented languages (a)C++ (b) Java (c) Eiffel (d) All of the above 10.Overload function in C++ (a) a group function with the same name (b)all have the same number and type of arguments (c) functions with same name and same number and type of arguments (d) All of the above

11. Operator overloading is (a)making c++ operators works with objects (b) giving new meaning to existing c++ operators (c) making new c++ operator (d) both a& b above 12.A constructor is called whenever (a) a object is declared (b) an object is used (c) a class is declared (d) a class is used 13. A class having no name (a) is not allowed (b) can't have a constructor (c) can't have a destructor (d) can't be passed as an argument 14. The differences between constructors and destructor are (a) constructors can take arguments but destructor can't (b) constructors can be overloaded but destructors can't be overloaded (c) both a & b (d) None of these 15. A destructor takes (a) one argument (b) two arguments (c) three arguments (d) Zero argument 16. Constructors are used to (a) initialize the objects (b) construct the data members (c) both a & b (d) None of these 17. The fields in a class of a c++ program are by default (a) protected (b) public (c) private (d) None of these

You might also like