Main(){ int x=5; for(;x!=0;x--) { printf("x=%dn", x--); }}

A) 5, 3, 1
B) 4, 3, 2, 1, 0
C) 5, 4, 3, 2,1
D) none of the above
Explanation: Infinite loop as x is decremented twice, it never be 0 and loop is going on & on

Showing Answers 1 - 3 of 3 Answers

vaseem

  • Jan 3rd, 2006
 

ANS: 5 4 3 2 1.

  Was this answer useful?  Yes

raj

  • Jul 30th, 2006
 

Infinite LOOP

x is never equal to zero

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions