Wipro PRP - 5th June

Wipro PRP - 5th June

University

15 Qs

quiz-placeholder

Similar activities

C++ Array

C++ Array

University

10 Qs

DataStructUTS

DataStructUTS

University

12 Qs

Java Programming-1

Java Programming-1

University

10 Qs

2D Array Test

2D Array Test

9th Grade - University

20 Qs

JAVA Array (1)

JAVA Array (1)

University

10 Qs

UAS Praktikum: Logika dan Algoritma Pemrograman

UAS Praktikum: Logika dan Algoritma Pemrograman

1st Grade - University

10 Qs

BSIS 2-3- Quiz in ARRAY

BSIS 2-3- Quiz in ARRAY

University

20 Qs

module3

module3

University

15 Qs

Wipro PRP - 5th June

Wipro PRP - 5th June

Assessment

Quiz

Computers

University

Hard

Created by

Kavitha Murugan

Used 8+ times

FREE Resource

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);

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);
		}
	}
}

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?