C++ Programming :: Operator Overloading

NA
SHSTTON
1
Solv. Corr.
2
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

1 / 6

Choose the correct option.

Which of the following operators can be overloaded?


A.(dot or member access operator)

B& (address-of operator)

Csizeof operator

D?: (conditional operator)

Answer: Option D

Explanation:

&

Workspace

NA
SHSTTON
1
Solv. Corr.
2
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

2 / 6

Choose the correct option.

You overload an operator by naming it a


Avariable

Bbuilt-in type

Cfunction

Dclass.

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
3
Solv. Corr.
1
Solv. In. Corr.
4
Attempted
0 M:0 S
Avg. Time

3 / 6

Choose the correct option.

If no exception is thrown, then


Aa catch block will-cause an error

Bthe first catch block coded will execute

Cthe last catch block coded will execute

Dany catch blocks coded will be by passed.

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
2
Solv. Corr.
1
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

4 / 6

Choose the correct option.

To overload an operator ____________ keyword must be used along with the operator to be overloaded.


AOver

BOverload

CVoid

DOperator

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
3
Solv. Corr.
0
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

5 / 6

Choose the correct option.

Operators such as ____________ cannot be overloaded.


A+

B++

C: :

D= =

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
3
Solv. Corr.
2
Solv. In. Corr.
5
Attempted
0 M:0 S
Avg. Time

6 / 6

Choose the correct option.

Which of the function operator cannot be over loaded


A<=

B?:

C==

D*

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace