Loops end with semicolon:

#include < stdio.h >
void main()
{
int i=1;
while(i =0);
printf(�%d�,i);
}


Is�t makes compilation error?
No, It won�t make error. It�ll show only for assigning value in condition as �possibly incorrect assignment�.

Output :
0


While(i=0);
is equivalent to
while(i=0)
{
}

so there's no errors in this coding

Related Posts