titli_juit wrote:
> unsigned int i=10;
> while(i>=0)
> {
> printf("Hi");
> i--;
> }
> 
> why the result is an infinite loop??

i is unsigned which means it can never be a negative value.  You should 
have received a compiler warning about "evaluation is always true". 
Turn up your compiler's warning level until you get such a warning.

You should also learn to step through code with a debugger.  It is an 
important skill.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to