java-control structures-vlits

java-control structures-vlits

1st Grade

10 Qs

quiz-placeholder

Similar activities

Programação de Computadores - Aula - 6

Programação de Computadores - Aula - 6

1st - 3rd Grade

10 Qs

Sains Komputer Tingkatan 5: Bahasa Penskripan

Sains Komputer Tingkatan 5: Bahasa Penskripan

1st - 12th Grade

10 Qs

İnternet Programlama

İnternet Programlama

1st Grade

15 Qs

Ôn tập về phần mềm soạn thảo văn bản

Ôn tập về phần mềm soạn thảo văn bản

1st - 5th Grade

10 Qs

Bazy danych i dodatek Power Query - Informatyka kl. 2

Bazy danych i dodatek Power Query - Informatyka kl. 2

1st - 5th Grade

10 Qs

PREGUNTAS BÁSICAS SOBRE CONOCIMIENTO INFORMÁTICO

PREGUNTAS BÁSICAS SOBRE CONOCIMIENTO INFORMÁTICO

1st Grade - Professional Development

10 Qs

BÀI KIỂM TRA GIỮA KÌ 2 - LỚP 3

BÀI KIỂM TRA GIỮA KÌ 2 - LỚP 3

1st - 10th Grade

10 Qs

cyber Security

cyber Security

1st - 5th Grade

12 Qs

java-control structures-vlits

java-control structures-vlits

Assessment

Quiz

Computers

1st Grade

Practice Problem

Hard

Created by

kolla vivek

Used 47+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

do-while

while

for

none of the mentioned

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the data type that can be used with case statement in switch control structure?

The double data type.

The float data type.

The char data type.

The String data type.

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which of the following will be the output of the above program?

public class Compute {

public static void main (string args [ ]){

int result, x ;

x = 1 ;

result = 0;

while (x < = 10) {

if (x%2 == 0)

result + = x ;

+ + x ;

}

System.out.println(result) ;

}

}

55

30

25

35

4.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

class Test {

public static void main(String[] args){

int i = 0, j = 9;

do {

i++;

if (j-- < i++) {

break;

}

} while (i < 5);

System.out.println(i + "" + j);

}

}

44

55

66

77

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

public class Test{

public static void main(String args[]){

int i = 0, j = 5 ;

for( ; (i < 3) && (j++ < 10) ; i++ ){

System.out.print(" " + i + " " + j );

}

System.out.print(" " + i + " " + j );

}

}

0 6 1 7 2 8 3 8

0 6 1 7 2 8 3 9

0 6 1 5 2 5 3 5

Compilation Error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

class Test{

public static void main(String args[]){

int x=7;

if(x==2); // Note the semicolon

System.out.println("NumberSeven");

System.out.println("NotSeven");

}

}

NumberSeven NotSeven

NumberSeven

NotSeven

Error

7.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

public class Test{

public static void main(String args[]){

int i, j;

for(i=1, j=0;i<10;i++) j += i;

System.out.println(i);

}

}

10

11

9

20

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?