Classical

Object Oriented Programming - Object Modelling

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

operator*()

B.

*operator()

C.

op*()

D.

*op()

 
 

Option: D

Explanation :


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

operator*()

B.

*operator()

C.

op*()

D.

*op()

 
 

Option: A

Explanation :


123:  
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 :


124:  
Assuming that properly overloaded the *operator to perform multiplication for a Number class, and that a, b, and c are three members of the Number class, which expression is legal?
A.

a*b

B.

a*b*c

C.

Both (a) and (b)

D.

None of these

 
 

Option: C

Explanation :


125:  
When an operator is used alone with a single variable argument, the operator is called
A.

unique

B.

unary

C.

alone

D.

allocated

 
 

Option: B

Explanation :




Suggest an improvement