Multiple Choice
Which of the following loops will print the odd numbers between 0 and 20?
A) int num = 1;
While (num < 10)
{
Int value = num * 2 - 1;
System.out.print (value + " ") ;
Num ++;
}
B) int num = 1;
While (num < 20)
{
Int value = num * 2 - 1;
System.out.print (value + " ") ;
Num ++;
}
C) int num = 1;
While (num < 10)
{
System.out.print (num + " ") ;
Num += 2;
}
D) int num = 1;
While (num < 20)
{
Num += 2;
System.out.print (num + " ") ;
}
Correct Answer:

Verified
Correct Answer:
Verified
Q40: How many times does the code snippet
Q41: Which for loop prints data across each
Q42: How do you fix this code snippet
Q43: What output does this while loop generate?
Q44: Which of the following is considered a
Q46: What will be printed by the statements
Q47: Which code snippet produces the sum of
Q48: What does the following code snippet display?
Q49: Suppose you must design a program to
Q50: What are the values of i and