Search Header Logo

class 10 output

Authored by Vivek Chamaria

Computers

10th Grade

35 Questions

Used 4+ times

class 10 output
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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;

}

Access all questions and much more by creating a free account

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

Already have an account?

Discover more resources for Computers