Please login to post your comments.
Fill in the blanks.
State whether the following statements are True (T) or False (F).
What is the output of the following program fragment:
int i,s=0;
for(i=1;i<=4;i++)
{
s=s+i;
}
System.out.println(s);How many times will the following loop execute?
int y;
for(y=1,y<=7;y++)
{
y++;
}What will the following loop display?
for(A=1;A<=7;A+=2);
System.out.print(A+" ");
System.out.println(A);Find the errors in the given for loop.
class x {
static void main()
{
int s;
for(s=1,s<=10,s++)
{
System.out.println(s)
}
}
}