Calculate the number of iterations in the following loop.

1.3 Calculate the number of iterations in the following loop.
main() { int x=5, y=10, z=9;
for( ; x<=5 ; )
{ y++; z--;
x=x+1/2;
if(z==0) z=y ; } }
A) Only one iteration
B) Infinite
C) 32762
D) None of the above


Leave a Reply