6.1

Identify the error in the following program.

Answer

Here there is no default constructor, so object could not be written without any argument.
Correction :

6.2

Identify the error in the following program.

Answer

Room() and Room(int value=8) Functions are same, so it show Ambiguity error.
Correction : Erase Room() function and then error will not show.

6.3

Identify the error in the following program.

Answer

Just erase “objRoom4 = objRoom3; invalid to call copy constructor.” for successfully run.

6.4

Identify the error in the following program.

Answer

Same as 6.3 problem solution.


Next Previous