+ 1
Find the Output
3 Respuestas
+ 3
When using post decrement,
On second last iteration, c will have value 1.
So after division operation, when it checks the condition
while(c--);
The condition will evaluate to true (any non zero number is true), after evaluation of condition the value of 'c' will be decremented and it will have 0 now.
As the condition was true, so loop body will execute. And any number divided by 0 is infinity.
So in case of pre decrement, first c will be equal to 0 and condition will evaluate to false. So it will terminate from the loop.
+ 1
FOLLOW ME
Just correct to " --c".
+ 1
Good.... But put post decrement what will be the Output and why