C Programming :: Loop Control - Discussion
Home > C Programming > Loop Control > MCQs Questions Discussion
10 / 61
Find out the error in the 'while' loop, if any ?
#include<stdio.hvoid main()
{
int i= 1;
while ()
{
printf("%d", i++);
if (i > 10)
break;
}
}
#include<stdio.hvoid main()
{
int i= 1;
while ()
{
printf("%d", i++);
if (i > 10)
break;
}
}
AThe condition in the while loop is a must
BThere should be at least a semicolon in the while ()
CThe while loop should be replaced by for loop
DNo error
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!