Classical

Object Oriented Programming - Object Modelling

11:  

Without overloading of the + operator,

A.

addition could not be performed on built-in types

B.

addition could not be performed on class objects

C.

class objects could not be added to one another

D.
programs would be harder to read and understand.
 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



12:  
Which of the following operators may be overloaded?
A.

.(Member)

B.

::(scope resolution)

C.

%(Modulus)

D.

?:(conditional)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



13:  
Which of the following may be overloaded as an  operator?
A.

operator*()

B.

*operator()

C.

op*()

D.

*op()

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



14:  
The name of the operator function that overloads the * symbol is
A.

operator*()

B.

*operator()

C.

op*()

D.

*op()

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



15:  
Assuming that properly overloaded the / operator for a Number class, and that a and b are two members of the Number class, which expression is legal?
A.

a/b

B.

a operator/ (b)

C.

Both (a) and (b)

D.

None of these

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:







Suggest an improvement