CS201 Quiz Introduction to Programming C++ [11]
Question # 1
We cannot do arithmetic with references like pointers. 1) : True
2) : FALSE
3) :
4) :
Question # 2
In functions that return reference, use global or static variables. 1) : True
2) : FALSE
3) :
4) :
Question # 3
In functions that return reference, use only static variables. 1) : True
2) : FALSE
3) :
4) :
Question # 4
The reference data types are used as ordinary variables without any dereference operator. 1) : True
2) : FALSE
3) :
4) :
Question # 5
Which of the following operators can not be overloaded? 1) : new
2) : delete
3) : +=
4) : sizeof
Question # 6
The declarator of Plus (+) member operator function is 1) : Class-Name operator + (Class-Name rhs)
2) : operator Class-Name + ( )
3) : operator Class-Name + ( rhs)
4) : Class-Name operator + ( )
Question # 7
We can create a new operator through operator overloading. 1) : TRUE
2) : FALSE
3) :
4) :
Question # 8
In overloading the assignment (=) operator, which object will call the operator function? 1) : Right object of the assignment operator
2) : Left object of the assignment operator
3) : Both objects will call the assignment operator
4) : No object will call the assignment operator
Question # 9
Which statement about operator overloading is false? 1) : New operators can never be created
2) : Certain overloaded operators can change the number of arguments they take.
3) : The precedence of an operator cannot be changed by overloading.
4) : Overloading cannot change how an operator works on built-in types.
Question # 10
Initializing the data members in the definition of the class is ___________ 1) : syntax error
2) : logical error
3) : not an error
4) : none of the given options