NEW
Font size
WorksheetsComputer Programming I Finals
Total questions: 11
Worksheet time: 4mins
A for loop is a post-test loop.
True
False
A syntax error will result if the control statements of a for loop are omitted.
True
False
If a semicolon is placed at the end of a for loop, an infinite loop will result.
True
False
If the initial condition of any while loop is false it will still execute once.
True
False
In a for loop, which of the following is executed first?
initial expression
logical expression
update expression
for loop statement
In do-while statement, the condition is evaluated first before the block statement is executed.
True
False
The for loop has three (3) expressions, for( expr1; expr2; expr3 ). All the three expressions are required.
True
False
The following is a valid declaration of an array in Java:
int x[][] = new int[][3];
True
False
The last index of one dimensional array is equal to the length of the array -1.
True
False
Which executes first in a do...while loop?
statement
logical expression
initial statement
update expression
True
False
