:TYPE:MC:1:0:C :TITLE:Question MC #1 :QUESTION:H
What is the output?     

      int cnt=0;
for(int a=0; a<10; a=a+4)
{  
cnt++;
}
out.println(cnt);
:LAYOUT:vertical :ANSWER1:0:H 2 :REASON1:T Incorrect. :ANSWER2:100:H 3 :REASON2:T Correct. :ANSWER3:0:H 4 :REASON3:T Incorrect. :ANSWER4:0:H 5 :REASON4:T Incorrect. :ANSWER5:0:H 6 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #2 :QUESTION:H
What is the output?     

      int mark=0;
for(int b=0; b<10; b=b+3)
{  
mark++;
}
out.println(mark);
:LAYOUT:vertical :ANSWER1:0:H 2 :REASON1:T Incorrect. :ANSWER2:0:H 3 :REASON2:T Incorrect. :ANSWER3:100:H 4 :REASON3:T Correct. :ANSWER4:0:H 5 :REASON4:T Incorrect. :ANSWER5:0:H 6 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #3 :QUESTION:H
What is the output?     

      int counter=0;
for(int c=0; c<10; c=c+2)
{  
counter++;
}
out.println(counter);
:LAYOUT:vertical :ANSWER1:0:H 2 :REASON1:T Incorrect. :ANSWER2:0:H 3 :REASON2:T Incorrect. :ANSWER3:0:H 4 :REASON3:T Incorrect. :ANSWER4:100:H 5 :REASON4:T Correct. :ANSWER5:0:H 6 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #4 :QUESTION:H
What is the output?     

      int cntr=0;
for(int d=0; d<10; d=d+5)
{  
cntr++;
}
out.println(cntr);
:LAYOUT:vertical :ANSWER1:100:H 2 :REASON1:T Correct. :ANSWER2:0:H 3 :REASON2:T Incorrect. :ANSWER3:0:H 4 :REASON3:T Incorrect. :ANSWER4:0:H 5 :REASON4:T Incorrect. :ANSWER5:0:H 6 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #5 :QUESTION:H
What is the output?

            for(int e=1; e<3; e++)  
System.out.print(e);
:LAYOUT:vertical :ANSWER1:0:H 123 :REASON1:T Incorrect. :ANSWER2:100:H 12 :REASON2:T Correct. :ANSWER3:0:H 1234 :REASON3:T Incorrect. :ANSWER4:0:H 12345 :REASON4:T Incorrect. :ANSWER5:0:H 4321 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #6 :QUESTION:H
What is the output? 

        for(int f=1; f<5; f++)  
System.out.print(f);
:LAYOUT:vertical :ANSWER1:0:H 123 :REASON1:T Incorrect. :ANSWER2:0:H 12 :REASON2:T Incorrect. :ANSWER3:100:H 1234 :REASON3:T Correct. :ANSWER4:0:H 12345 :REASON4:T Incorrect. :ANSWER5:0:H 4321 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #7 :QUESTION:H
What is the output? 

          for(int g=1; g<4; g++)  
System.out.print(g);
:LAYOUT:vertical :ANSWER1:100:H 123 :REASON1:T Correct. :ANSWER2:0:H 12 :REASON2:T Incorrect. :ANSWER3:0:H 1234 :REASON3:T Incorrect. :ANSWER4:0:H 12345 :REASON4:T Incorrect. :ANSWER5:0:H 4321 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #8 :QUESTION:H
What is the output? 

         for(int h=1; h<6; h++)  
System.out.print(h);
:LAYOUT:vertical :ANSWER1:0:H 123 :REASON1:T Incorrect. :ANSWER2:0:H 12 :REASON2:T Incorrect. :ANSWER3:0:H 1234 :REASON3:T Incorrect. :ANSWER4:100:H 12345 :REASON4:T Correct. :ANSWER5:0:H 4321 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #9 :QUESTION:H
What is the output?     

      for(int i=18; i>0; i=i-5)  
out.print(i);
:LAYOUT:vertical :ANSWER1:0:H 1383 :REASON1:T Incorrect. :ANSWER2:0:H 83 :REASON2:T Incorrect. :ANSWER3:0:H 1813 :REASON3:T Incorrect. :ANSWER4:100:H 181383 :REASON4:T Correct. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #10 :QUESTION:H
What is the output?     

      int j=1, tally=0;
while(j<8)
{  
tally++;
j++;
      out.print(tally);
:LAYOUT:vertical :ANSWER1:0:H 6 :REASON1:T Incorrect. :ANSWER2:100:H 7 :REASON2:T Correct. :ANSWER3:0:H 8 :REASON3:T Incorrect. :ANSWER4:0:H 9 :REASON4:T Incorrect. :ANSWER5:0:H 10 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #11 :QUESTION:H
What is the output?     

      int k=0;
while(k<3)
{  
System.out.print(k);  
k++;
}
:LAYOUT:vertical :ANSWER1:0:H 12 :REASON1:T Incorrect. :ANSWER2:100:H 012 :REASON2:T Correct. :ANSWER3:0:H 0123 :REASON3:T Incorrect. :ANSWER4:0:H 123 :REASON4:T Incorrect. :ANSWER5:0:H 01234 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #12 :QUESTION:H
What is the output?     

      int m=0;
while(m<4)
{  
System.out.print(m);  
m++;
}
:LAYOUT:vertical :ANSWER1:0:H 12 :REASON1:T Incorrect. :ANSWER2:0:H 012 :REASON2:T Incorrect. :ANSWER3:100:H 0123 :REASON3:T Correct. :ANSWER4:0:H 123 :REASON4:T Incorrect. :ANSWER5:0:H 01234 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #13 :QUESTION:H
What is the output?     

      int n=2, tallie=0;
while(n<9)
{  
tallie=tallie+n;  
n++;
}
System.out.print(tallie);
:LAYOUT:vertical :ANSWER1:0:H 104 :REASON1:T Incorrect. :ANSWER2:0:H 54 :REASON2:T Incorrect. :ANSWER3:0:H 44 :REASON3:T Incorrect. :ANSWER4:100:H 35 :REASON4:T Correct. :ANSWER5:0:H 65 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #14 :QUESTION:H
What is the output?     

      int p=1;
do
              {  
           p++;
               }
while(p<5);
out.println(p);
:LAYOUT:vertical :ANSWER1:0:H 3 :REASON1:T Incorrect. :ANSWER2:0:H 4 :REASON2:T Incorrect. :ANSWER3:100:H 5 :REASON3:T Correct. :ANSWER4:0:H 6 :REASON4:T Incorrect. :ANSWER5:0:H 7 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #15 :QUESTION:H
What is the output?     

      int q=0;
while(q<5)
{  
System.out.print(q);  
q++;
}
:LAYOUT:vertical :ANSWER1:0:H 12 :REASON1:T Incorrect. :ANSWER2:0:H 012 :REASON2:T Incorrect. :ANSWER3:0:H 0123 :REASON3:T Incorrect. :ANSWER4:0:H 123 :REASON4:T Incorrect. :ANSWER5:100:H 01234 :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #16 :QUESTION:H
What is the output?     

      int r=0;
do
            {  
System.out.print(r);  
r++;
}
while(r<5);
:LAYOUT:vertical :ANSWER1:0:H 12 :REASON1:T Incorrect. :ANSWER2:0:H 012 :REASON2:T Incorrect. :ANSWER3:0:H 0123 :REASON3:T Incorrect. :ANSWER4:0:H 123 :REASON4:T Incorrect. :ANSWER5:100:H 01234 :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #17 :QUESTION:H
What is the output?     

      int s=1;
do
                  {  
            s++;  
System.out.print(s);
                   }
while(s<5);
:LAYOUT:vertical :ANSWER1:0:H 234 :REASON1:T Incorrect. :ANSWER2:0:H 1234 :REASON2:T Incorrect. :ANSWER3:0:H 12345 :REASON3:T Incorrect. :ANSWER4:100:H 2345 :REASON4:T Correct. :ANSWER5:0:H 23456 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #18 :QUESTION:H
What is the output?     

      int t=2,
summer=0;
while(t<12)
                      {  
            summer=summer+t;  
t++;
}
System.out.print(summer);
:LAYOUT:vertical :ANSWER1:0:H 104 :REASON1:T Incorrect. :ANSWER2:0:H 54 :REASON2:T Incorrect. :ANSWER3:0:H 44 :REASON3:T Incorrect. :ANSWER4:0:H 35 :REASON4:T Incorrect. :ANSWER5:100:H 65 :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #19 :QUESTION:H
What is the output?     

      int u=2;
while(5>u)
{  
System.out.print(u);  
u++;
}
:LAYOUT:vertical :ANSWER1:0:H 2 :REASON1:T Incorrect. :ANSWER2:0:H 23 :REASON2:T Incorrect. :ANSWER3:100:H 234 :REASON3:T Correct. :ANSWER4:0:H 34 :REASON4:T Incorrect. :ANSWER5:0:H 2345 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #20 :QUESTION:H
What is the output?     

      int v=2;
do
      {  
v++;
                  }
while(v<6);
System.out.println(v);
:LAYOUT:vertical :ANSWER1:0:H 3 :REASON1:T Incorrect. :ANSWER2:0:H 4 :REASON2:T Incorrect. :ANSWER3:0:H 5 :REASON3:T Incorrect. :ANSWER4:100:H 6 :REASON4:T Correct. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #21 :QUESTION:H
What is the output?     

      double w = 5.0;
while(w>0)
{  
w=w-0.75;
}
System.out.println(w);
:LAYOUT:vertical :ANSWER1:0:H 0.50 :REASON1:T Incorrect. :ANSWER2:0:H 0.25 :REASON2:T Incorrect. :ANSWER3:0:H 0.75 :REASON3:T Incorrect. :ANSWER4:100:H -0.25 :REASON4:T Correct. :ANSWER5:0:H -0.75 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #22 :QUESTION:H
What is the output?     

      int x=30;
while(x>4)
{  
        System.out.print(x + " ");  
        x=x/2;
}
:LAYOUT:vertical :ANSWER1:100:H 30 15 7 :REASON1:T Correct. :ANSWER2:0:H 30 15 7 3 :REASON2:T Incorrect. :ANSWER3:0:H 30 15 7 3 1 :REASON3:T Incorrect. :ANSWER4:0:H 30 15 :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #23 :QUESTION:H
What is the output?     

      int y=2;
while(6>y)
{  
System.out.print(y);  
y++;
}
:LAYOUT:vertical :ANSWER1:0:H 2 :REASON1:T Incorrect. :ANSWER2:0:H 23 :REASON2:T Incorrect. :ANSWER3:0:H 234 :REASON3:T Incorrect. :ANSWER4:0:H 34 :REASON4:T Incorrect. :ANSWER5:100:H 2345 :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #24 :QUESTION:H
What is the output?     

      for(int ab=0; ab<=1; ab++)
{  
for(int cd=1;cd<=2;cd++)     
System.out.print(ab%cd);
}
:LAYOUT:vertical :ANSWER1:100:H 0001 :REASON1:T Correct. :ANSWER2:0:H 0011 :REASON2:T Incorrect. :ANSWER3:0:H 1100 :REASON3:T Incorrect. :ANSWER4:0:H 0000 :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #25 :QUESTION:H
What is the output?     

String word = "abcd";
for(char let : word.toCharArray())
{   
out.print(let);
}
:LAYOUT:vertical :ANSWER1:0:H c :REASON1:T Incorrect. :ANSWER2:0:H cccc :REASON2:T Incorrect. :ANSWER3:100:H abcd :REASON3:T Correct. :ANSWER4:0:H dcba :REASON4:T Incorrect. :ANSWER5:0:H dddd :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #26 :QUESTION:H
What is the output?     

      for(int num=53; num>0; num=num-11)  
System.out.print(num+" ");
:LAYOUT:vertical :ANSWER1:0:H 53 42 31 20 :REASON1:T Incorrect. :ANSWER2:0:H 53 42 31 :REASON2:T Incorrect. :ANSWER3:0:H 42 31 20 9 :REASON3:T Incorrect. :ANSWER4:0:H 53 42 31 20 9 -2 :REASON4:T Incorrect. :ANSWER5:100:H 53 42 31 20 9 :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #27 :QUESTION:H
What is the output?     

      for(int bug=10; bug>-10; bug=bug-3)  
System.out.print(bug+ " ");
:LAYOUT:vertical :ANSWER1:0:H 10 7 4 1 -2 -5 :REASON1:T Incorrect. :ANSWER2:0:H 7 4 1 -2 -5 -8 :REASON2:T Incorrect. :ANSWER3:0:H 10 7 4 1 -2 :REASON3:T Incorrect. :ANSWER4:100:H 10 7 4 1 -2 -5 -8 :REASON4:T Correct. :ANSWER5:0:H 7 4 1 -2 -5 :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #28 :QUESTION:H
What is the output?     

      String st = "dog";
for(int a=0; a<st.length(); a++)
                      {   
for(int b=1;b<=a;b++)
                            {     
          System.out.print(" ");  
                            } 
            for(int c=a;c<=st.length()/2+1;c++)
{     
System.out.print(st.charAt(a));  
}  
System.out.println();
}

ANSWER CHOICES:

mc028-1.jpg
:LAYOUT:vertical :ANSWER1:0:H OUTPUT A ABOVE :REASON1:T Incorrect. :ANSWER2:0:H OUTPUT B ABOVE :REASON2:T Incorrect. :ANSWER3:100:H OUTPUT C ABOVE :REASON3:T Correct. :ANSWER4:0:H OUTPUT D ABOVE :REASON4:T Incorrect. :ANSWER5:0:H none of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #29 :QUESTION:H
What is the output?     

String s = "dog";
for(int x=0; x<s.length(); x++)
{   
for(int k=0;k<=x;k++)
{     
System.out.print(s.charAt(x));  
}  
System.out.println();
}

ANSWER CHOICES:

mc029-1.jpg

:LAYOUT:vertical :ANSWER1:0:H CHOICE A ABOVE :REASON1:T Incorrect. :ANSWER2:0:H CHOICE B ABOVE :REASON2:T Incorrect. :ANSWER3:0:H CHOICE C ABOVE :REASON3:T Incorrect. :ANSWER4:100:H CHOICE D ABOVE :REASON4:T Correct. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #30 :QUESTION:H
What is the output?     

      int n = 17;
boolean check = true;
for(int i=2; i<n; i++ )
{   
if(n%i == 0)
{       
check = false;  
}
}
out.println(check);
:LAYOUT:vertical :ANSWER1:0:H 75 :REASON1:T Incorrect. :ANSWER2:0:H 2 :REASON2:T Incorrect. :ANSWER3:100:H true :REASON3:T Correct. :ANSWER4:0:H false :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #31 :QUESTION:H
What is the output?

      int total = 0;
for(int i=1; i<=10; i=i+3)  
for(int x=1; x<=i; x=x+2)     
total = total + x;
out.println(total);
:LAYOUT:vertical :ANSWER1:0:H 40 :REASON1:T Incorrect. :ANSWER2:0:H 42 :REASON2:T Incorrect. :ANSWER3:0:H 44 :REASON3:T Incorrect. :ANSWER4:100:H 46 :REASON4:T Correct. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #32 :QUESTION:H
What is the output?

      int total = 0;
for(int i=1; i<=7; i=i+2)  
for(int x=1; x<=i; x=x+3)     
total = total + i;
out.println(total);
:LAYOUT:vertical :ANSWER1:0:H 31 :REASON1:T Incorrect. :ANSWER2:100:H 35 :REASON2:T Correct. :ANSWER3:0:H 36 :REASON3:T Incorrect. :ANSWER4:0:H 37 :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #33 :QUESTION:H
What is the output?

      int size = 2;
for(int i=0; i<=size; i++ )
{  
for(int k=i; k<=size; k++ )     
out.print(‘%’);  
out.println();
}

ANSWER CHOICES:
mc033-1.jpg
:LAYOUT:vertical :ANSWER1:100:H CHOICE A ABOVE :REASON1:T Correct. :ANSWER2:0:H CHOICE B ABOVE :REASON2:T Incorrect. :ANSWER3:0:H CHOICE C ABOVE :REASON3:T Incorrect. :ANSWER4:0:H CHOICE D ABOVE :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #34 :QUESTION:H
What is the output?

      int size = 2;
for(int i=0; i<=size; i++ )
{  
for(int x=0; x<=i; x++ )     
out.print( ‘$’ );  
}

ANSWER CHOICES:
mc034-1.jpg
:LAYOUT:vertical :ANSWER1:0:H CHOICE A ABOVE :REASON1:T Incorrect. :ANSWER2:0:H CHOICE B ABOVE :REASON2:T Incorrect. :ANSWER3:0:H CHOICE C ABOVE :REASON3:T Incorrect. :ANSWER4:100:H CHOICE D ABOVE :REASON4:T Correct. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #35 :QUESTION:H
What is the output?

      int size=2;
for(int i=0; i<=size; i++ )
{  
for(int x=0; x<=i; x++ )     
out.print( ‘$’ );     
out.println();
}

ANSWER CHOICES:
mc035-1.jpg

:LAYOUT:vertical :ANSWER1:100:H CHOICE A ABOVE :REASON1:T Correct. :ANSWER2:0:H CHOICE B ABOVE :REASON2:T Incorrect. :ANSWER3:0:H CHOICE C ABOVE :REASON3:T Incorrect. :ANSWER4:0:H CHOICE D ABOVE :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #36 :QUESTION:H
What is the output?

      int size=2;
for(int i=0; i<=size; i++ )
{  
for(int x=0; x<=i; x++ )     
out.print( ‘$’ );     
for(int k=i; k<=size; k++ )     
out.print( ‘%’ );  
out.println();
}

ANSWER CHOICES:
mc036-1.jpg
:LAYOUT:vertical :ANSWER1:0:H CHOICE A ABOVE :REASON1:T Incorrect. :ANSWER2:0:H CHOICE B ABOVE :REASON2:T Incorrect. :ANSWER3:100:H CHOICE C ABOVE :REASON3:T Correct. :ANSWER4:0:H CHOICE D ABOVE :REASON4:T Incorrect. :ANSWER5:0:H None of these :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #37 :QUESTION:H
Which of the following loops will print out the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10?

I.                        II.                        III.     
for(int i=1;i<=10;i++)            int i=0;                        int i=0;
{                        while(i<10)                  while(i<10)
   out.println(i);            {                              {
}                        out.println(i);                          i++;
                        i++;                                out.println(i);
                        }                              }

:LAYOUT:vertical :ANSWER1:0:H I only :REASON1:T Incorrect. :ANSWER2:0:H II only :REASON2:T Incorrect. :ANSWER3:0:H I and II only :REASON3:T Incorrect. :ANSWER4:100:H I and III only :REASON4:T Correct. :ANSWER5:0:H II and III only :REASON5:T Incorrect. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #38 :QUESTION:H
Which of the following loops will print out the numbers 2, 4, 6, 8, 10?

I.                        II.                              III.           
int i=2;                        for(int i=2;i<=10;i=i+2)            int i=2;
while(i<10){                  {                              while(i<=10){
out.println(i);                  out.println(i);                        out.println(i);
i=i+2;                        }                                    i=i+2;
}                                                            }

:LAYOUT:vertical :ANSWER1:0:H I only :REASON1:T Incorrect. :ANSWER2:0:H II only :REASON2:T Incorrect. :ANSWER3:0:H I and II only :REASON3:T Incorrect. :ANSWER4:0:H I and III only :REASON4:T Incorrect. :ANSWER5:100:H II and III only :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #39 :QUESTION:H
Which of the following loops will print out the numbers 3, 5, 7, 9, 11?

I.                  II.                  III.     
int i=1;                        int i=3;                        for(int i=4;i<=12;i=i+2)
while(i<10)            while(i<=11)            {
{                  {                     out.println(i-1);
i=i+2;                    out.println(i);                   }
out.println(i);            i=i+2;           
}                  }           

:LAYOUT:vertical :ANSWER1:0:H I only :REASON1:T Incorrect. :ANSWER2:0:H II only :REASON2:T Incorrect. :ANSWER3:0:H I and III only :REASON3:T Incorrect. :ANSWER4:0:H II and III only :REASON4:T Incorrect. :ANSWER5:100:H I, II, and III :REASON5:T Correct. :CAT:CS1 :TYPE:MC:1:0:C :TITLE:Question MC #40 :QUESTION:H
Which of the following loops will print out the numbers 5, 10, 15, 20, 25?


I.                  II.                              III.
int i=5;                  for(int i=5;i<=25;i=i+5)            for(int i=4;i<24;i=i+5)
while(i<=25)            {                              {
{                         out.println(i);                           out.println(i+1);
out.println(i);            }                              }
i=i+5;                       
}                       

:LAYOUT:vertical :ANSWER1:0:H I only :REASON1:T Incorrect. :ANSWER2:0:H II only :REASON2:T Incorrect. :ANSWER3:100:H I and II only :REASON3:T Correct. :ANSWER4:0:H I and III only :REASON4:T Incorrect. :ANSWER5:0:H I,II, and III :REASON5:T Incorrect. :CAT:CS1