Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
Question 1
:
Point out the error, if any in the for loop.
#include<stdio.h>
int main()
{
int i=1;
for(;;)
{
printf("%d ", i++);
if(i>10)
break;
}
return 0;
}
1.
There should be a condition in the for loop
2.
The two semicolons should be dropped
3.
The for loop should be replaced with while loop.
4.
No error