7.1

Identify the error in the following program.

Answer

The argument of Space() function is void type, so when this function is called there are no argument can send to it. But ‘mCount’ argument is sending to Space() function through return space(mCount); Statement.
Here return space (mCount); replaced by return space();

7.2

Identify the error in the following program.

Answer

bool OP = = (WeekDays & w1, WeekDays & w2) replaced by bool operator = = (Weekdays & w1, WeekDays & w2 ). All other code will remain same.

7.3

Identify the error in the following program.

Answer

The float getWidth() function return float type data, but there is no return statement in getWidth() function. So it should write as follows.

All other code will remain unchanged.


Next Previous