CS201 Quiz Introduction to Programming C++ [8]
Question # 1
A preprocessor directive is identified by _________ symbol 1) : #
2) : $
3) : %
4) : ##
Question # 2
The default constructor has no arguments 1) : True
2) : FALSE
3) :
4) :
Question # 3
The data members of the class are initialized at runtime 1) : True
2) : FALSE
3) :
4) :
Question # 4
The data members of the class are initialized at creation Time 1) : True
2) : FALSE
3) :
4) :
Question # 5
The function call to a default constructor 1) : looks like any function call, except there is no return value
2) : never takes any arguments
3) : creates but cannot initialize an object
4) : is made automatically when an object is created
Question # 6
A friend function of a class has access 1) : To all data member and functions of the class
2) : Only to other friend functions of the class
3) : Only to private data of the class
4) : Only to public data of the class
Question # 7
The new operator 1) : is used to declare objects or variables
2) : can not create and initialize an object
3) : names an object or variable
4) : can allocate an appropriate amount of memory for an object or variable
Question # 8
Explicitly write keyword private in the class definition 1) : True
2) : FALSE
3) :
4) :
Question # 9
There is a class Student, Which one of the following is a valid destructor for this class. 1) : Student();
2) : ~ Student();
3) : ~ Student(int);
4) : int~ Student();
Question # 10
The reserved words public and private comes under the category 1) : structures
2) : strings
3) : accessibility modifiers
4) : types of functions