C Programming MCQ

1:

If c is a variable initialised to 1, how many times will the following loop be executed?

while ((c > 0) && (c < 60))
{
loop body
c ++;
}

A.

60

B.

59

C.

61

D.

None of these

 

Answer : B

Explanation :

sonali manohar shelke said: (8:02am on Monday 18th December 2017)
As here condition is given as C is greater than 0 and less than 60 which means its starting from 1 and end to 59,hence it will execute upto 59

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.