
Wipro PRP - 5th June
Authored by Kavitha Murugan
Computers
University
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1.Which type of loop is guaranteed to have the body execute at least once?
for
while
do while
for each
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. What keyword is used to end the current loop iteration and proceed execution with the next iteration of that loop?
break
continue
end
skip
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. What is the output of the following code snippet?
int i = 0;
for(i = 0 ; i < 5; i++){
}
System.out.println(i);
int i = 0;
for(i = 0 ; i < 5; i++){
}
System.out.println(i);0
4
5
6
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. What is the output of the following program?
public class Test{
public static void main(String []args){
for(int i = 0; i < 10; i++){
if(i % 2 == 0){
continue;
}
System.out.println(i);
}
}
}
public class Test{
public static void main(String []args){
for(int i = 0; i < 10; i++){
if(i % 2 == 0){
continue;
}
System.out.println(i);
}
}
}rogram will print all even numbers between 0 to 10
Program will print all odd numbers between 0 to 10
Program will print all numbers between 1 to 9
Program gives a compilation error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class HelloWorld {
public static void main(String[] args) {
int i = 70;
for(; i>60; ){
System.out.print(" "+i);
i--;
}
}
}
70 69 68 67 65 66 64 63 62 61
70 69 68 67 66 6564 63 62 61
61 62 63 64 65 66 67 68 69 70
70 68 66 64 62
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class LoopExample {
public static void main(String[] args) {
int i=12;
do{
++i;
if((i%2) == 0){
continue;
}
System.out.print(i+ " ");
}while(i<10);
}
}
13
1 2 3 4 5
1 3 5 7 9
1 3 5 7 9 11
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java arrays are
objects
reference
Primitive datatype
none
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?