CS201 3rd QUIZ
From Lecture # 28 to 32
http://vubest.blogspot.com
Question No: 1 ( Marks: 1 ) - Please choose one
► Class
► Object
► Compiler
►Primitive data type
Question No: 2 ( Marks: 1 ) - Please choose one
► True
► False
Question No: 3 ( Marks: 1 ) - Please choose one
► new int(10) ;
► new int[10] ;
► int new(10) ;
► int new[10];
Question No: 4 ( Marks: 1 ) - Please choose one
► inside, inside the class
► inside, outside the class
► outside, inside the class
► outside, outside the class
http://vubest.blogspot.com
Question No: 5 ( Marks: 1 ) - Please choose one
► Non-member functions
► Friend functions
► Any function outside class
► None of the given options
Question No: 6 ( Marks: 1 ) - Please choose one
► iostream.h
► stdlib.h
► iomanip.h
► fstream.h
Question No: 7 ( Marks: 1 ) - Please choose one
The endl and flush are _______
► Functions
► Operators
► Manipulators
► Objects
Question No: 8 ( Marks: 1 ) - Please choose one
► int, float, double
► objects of class
► int, float, object
► int, char, float
Question No: 9 ( Marks: 1 ) - Please choose one
► only class
► only objects
► both class and objects
► none of given options
Question No: 10 ( Marks: 1 ) - Please choose one
► looped
► nested
► overloaded
► none of the given options.
http://vubest.blogspot.com
Question No: 11 ( Marks: 1 ) - Please choose one
► A pointer to the class.
► An object of the class.
► A status code determining whether the class was destructed correctly
► Destructors do not return a value.
Question No: 12 ( Marks: 1 ) - Please choose one
class M {
friend int operator!(const M &);
...
};
!s // code of line implies that operator!(s)
...
Let assume if s is an object of the class then function is implemented as ___________
► Member function
► Non-member function
► Binary operator function
► None of the given options
Question No: 13 ( Marks: 1 ) - Please choose one
text = new String [5];
► Creates an array of 5 string objects statically
► Creates an array of 5 string objects dynamically
► Creates an array of pointers to string
► Creates a string Object
Question No: 14 ( Marks: 1 ) - Please choose one
► Only once during its life time
► Every time the function call
► Compile time of the program
► None of the above
Question No: 15 ( Marks: 1 ) - Please choose one
► Local
► Global
► Global or static
► None of the given option
Question No: 16 ( Marks: 1 ) - Please choose one
delete arr ;
► Deletes all the objects of array
► Deletes one object of array
► Do not delete any object
► Results into syntax error
Question No: 17 ( Marks: 1 ) - Please choose one
► Only block of memory is allocated for objects
► Only constructor is called for objects
► Memory is allocated first before calling constructor
► Constructor is called first before allocating memory
Question No: 18 ( Marks: 1 ) - Please choose one
► Only block of memory is deallocated for objects
► Only destructor is called for objects
► Memory is deallocated first before calling destructor
► Destructor is called first before deallocating memory
Question No: 19 ( Marks: 1 ) - Please choose one
► True
► False
http://vubest.blogspot.com
Question No: 20 ( Marks: 1 ) - Please choose one
► True
► False
Question No: 21 ( Marks: 1 ) - Please choose one
► 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: 22 ( Marks: 1 ) - Please choose one
► Functions, operators
► Classes, operators
► Operators, functions
► Operators, classes
Question No: 23 ( Marks: 1 ) - Please choose one
► 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 and private keywords.
Question No: 24 ( Marks: 1 ) - Please choose one
obj3 = obj1 - obj2;
► Member function
► Non-member function
► Friend function
► None of the given options
Question No: 25 ( Marks: 1 ) - Please choose one
► Class-name operator +() ;
► Class-name operator +(int) ;
► Class-name operator ++() ;
► Class-name operator ++(int) ;
Question No: 26 ( Marks: 1 ) - Please choose one
► data type
► memory referee
► value
► none of the given options.
Question No: 27 ( Marks: 1 ) - Please choose one
► at file scope
► within class definition
► within member function
► within main function
http://vubest.blogspot.com
good
ReplyDelete