class 10 output

class 10 output

10th Grade

35 Qs

quiz-placeholder

Similar activities

AP Java Exam

AP Java Exam

8th Grade - University

35 Qs

Latihan 1 PBO XI RPL 2

Latihan 1 PBO XI RPL 2

10th Grade - University

40 Qs

PTS Genap PEMROGRAMAN DASAR X TKJ 1

PTS Genap PEMROGRAMAN DASAR X TKJ 1

10th Grade

30 Qs

CS A 3.1 Boolean Expressions

CS A 3.1 Boolean Expressions

9th - 12th Grade

34 Qs

Robotics Final Study Guide

Robotics Final Study Guide

9th - 12th Grade

40 Qs

SAD 1 Decision Structures

SAD 1 Decision Structures

9th - 12th Grade

30 Qs

Strings In java

Strings In java

9th - 10th Grade

35 Qs

Project STEM AP CS A Unit 1

Project STEM AP CS A Unit 1

9th - 12th Grade

34 Qs

class 10 output

class 10 output

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Vivek Chamaria

Used 4+ times

FREE Resource

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

public

class Test {

public

static void main(String[] args)

{

int x = 10, y = 20;

if (x < y)

int a = 10;

else {

System.out.println("BYE");

}

}

}

10

BYE

NO output

Compile time error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

public

class Test {

public

static void main(String[] args)

{

int x = 10, y = 20;

if (x < y) {

if (x > y) {

System.out.println("HELLO GEEKS");

} else {

System.out.println("WELCOME");

}

}

}

}

HELLO GEEKS

Compile time error

WELCOME

No Output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

class Test {

public

static void main(String[] args)

{

String day = "Sunday";

switch (day) {

case "Monday":

System.out.println("Let's Work");

break;

case "Saturday":

System.out.println("waiting for Sunday");

break;

case "Sunday":

System.out.println("Today is fun day");

}

}

}

Compile time error

Lets work

Run- time error

Today is fun day

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

class MainClass {

public

static void main(String[] args)

{

int x = 10;

Switch(x)

{

System.out.println("GEEKS");

}

}

}

GEEKS

Compile time error

No Output

Run-time error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

class MainClass {

public

static void main(String[] args)

{

int x = 10;

int y = 20;

switch (x) {

case 10:

System.out.println("HELLO");

break;

case y:

System.out.println("GEEKS");

break;

}

}

}

HELLO

No Output

GEEKS

Compile time error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

public

class Test {

public

static void main(String[] args)

{

for (int i = 0; i < 10; i++)

int x = 10;

}

}

No Output

10

Compile time error

10 (10 times)

7.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

What will be the output of the below code when n=145

int number(int n)

{

int s=0;

while(n>0)

{

s=s+n%10;

n/=10;

}

return n;

}

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?