C++ Programming :: Operator Overloading

NA
SHSTTON
1
Solv. Corr.
8
Solv. In. Corr.
9
Attempted
0 M:32 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
4
Solv. Corr.
9
Solv. In. Corr.
13
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
4
Solv. Corr.
7
Solv. In. Corr.
11
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
9
Solv. Corr.
5
Solv. In. Corr.
14
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
7
Solv. Corr.
3
Solv. In. Corr.
10
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
12
Solv. Corr.
7
Solv. In. Corr.
19
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