Question
#include<stdio.h>
int main()
{
int i=1;
while()
{
printf("%d\n", i++);
if(i>10)
break;
}
return 0;
}
Point out the error, if any in the while loop.
#include<stdio.h>
int main()
{
int i=1;
while()
{
printf("%d\n", i++);
if(i>10)
break;
}
return 0;
}
Answer: Option A
Was this answer helpful ?
The while() loop must have conditional expression or it shows "Expression syntax" error.
Example: while(i > 10){ ... }
Was this answer helpful ?
More Questions on This Topic :
Question 6.
#include<stdio.h>
int main()
{
int i=4;
....
Submit Solution