-
In the program given below, point out the error, if any, in the for loop.
#include <studio.h>
int main()
{
int i = 1;
for (;;)
{
printf("%d\n", i++);
if (i > 10)
break;
}
return 0;
}
-
- There should be a condition in the for loop.
- The two semicolons should be dropped.
- The for loop should be replaced by a while loop.
- No error
Correct Option: D
No error