Multiple Choice
Last updated
Last updated
What type of loop should we use to request 10
numbers from the user as input?
What type of loop is depicted below?
How do we call the part int i = 0
in the code snippet below?
You wish to generate random numbers until you reach a number that is divisible by 9. What type of loop statement would your require for this?
What is the output of the following code snippet?
This is a(n) ...
To what does the output of this code snippet refer?
What is the last value of i
that will be outputted to the terminal?
In which of the situations below could you use a for-each loop?
Which construct is preferred in the following situation?
I wish to read a file line by line and stop at the first line that starts with the word
"The"
.
What is the output of the following piece of code?
What is the problem with the code below (you can safely assume that the necessary imports are made)?
What construction is depicted below?
Take the code construct below as a reference. In what order are the different parts of a for-loop executed/evaluated?