menu

CS201 Latest Solved

CS201 Latest Solved MCQs 13 ► The new operator determines the size of an object ► Allocates memory to object and returns pointer of valid type ► Creates an object and calls the constructor to initialize the object ► All of the given options Question No: 20 ( Marks: 1 ) - Please choose one new and delete are _____ whereas malloc and free are _____. ► Functions, operators ► Classes, operators ► Operators, functions ► Operators, classes Question No: 21 ( Marks: 1 ) - Please choose one Like member functions, ______ can also access the private data members of a class. ► Non-member functions ► Friend functions ► Any function outside class ► None of the given options Question No: 22 ( Marks: 1 ) - Please choose one Which of the following statement is best regarding declaration of friend function? ► Friend function must be declared after public keyword. ► Friend function must be declared after private keyword. ► Friend function must be declared at the top within class definition. ► It can be declared anywhere in class as these are not affected by the public andprivate keywords. Question No: 23 ( Marks: 1 ) - Please choose one The operator function overloaded for an Assignment operator (=) must be ► Non-member function of class ► Member function of class ► Friend function of class ► None of the given options Question No: 24 ( Marks: 1 ) - Please choose one For non-member operator function, object on left side of the operator may be ► Object of operator class ► Object of different class ► Built-in data type ► All of the given options for more just visit vu.ysapak.com CS201 Latest Solved MCQs 14 Question No: 25 ( Marks: 1 ) - Please choose one The operator function will be implemented as _____, if obj1 drive the - operator whereasobj2 is passed as arguments to - operator in the statement given below. obj3 = obj1 - obj2; ► Member function ► Non-member function ► Friend function ► None of the given options Question No: 26 ( Marks: 1 ) - Please choose one Which one of the following is the declaration of overloaded pre-increment operator implemented as member function? ► Class-name operator +() ; ► Class-name operator +(int) ; ► Class-name operator ++() ; ► Class-name operator ++(int) ; Question No: 27 ( Marks: 1 ) - Please choose one The static data members of a class are initialized _______ ► at file scope ► within class definition ► within member function ► within main function Question No: 28 ( Marks: 1 ) - Please choose one Class is a user defined___________. ► data type ► memory referee ► value ► none of the given options. Question No: 29 ( Marks: 1 ) - Please choose one We can also define a user-defines manipulators. ► True ► False for more just visit vu.ysapak.com http://htxt.it/G3aD