Consider the following programmain(){unsigned int i=10;while(i>=0) { printf("%u",i) i--; }}How many times the loop will get executed

Showing Answers 1 - 23 of 23 Answers

ak

  • Aug 4th, 2006
 

11 times

  Was this answer useful?  Yes

S.Sabarinathan

  • Sep 8th, 2006
 

Dear Friends, It will never end because the i is unsigned it will never reach the nagative value.

  Was this answer useful?  Yes

G.C.V.Rajesh

  • Sep 30th, 2006
 

It becomes an infinite loop.

  Was this answer useful?  Yes

ajay

  • Oct 5th, 2006
 

yes its an infine loop program good one anyways

  Was this answer useful?  Yes

APPU

  • Feb 1st, 2007
 

It results an infinite loop

  Was this answer useful?  Yes

The loop will never get executed because of compilation error odf semicolon at the end of printf Statement.

If that is solved then the loop will execute infinitely.....

  Was this answer useful?  Yes

The loop won't be executed because of semicolon at the end of printf statement is not available.

Suppose if we have it then it will execute infinitely.

  Was this answer useful?  Yes

anoophp_777

  • Jul 15th, 2009
 

Since int is Unsigned, the value of i does not go below zero. Hence the condition in the loop is always true and hence, its an infinite loop.

  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