Search Header Logo

Output based

Authored by scoremaster JAVA

Education

Professional Development

24 Questions

Used 1+ times

Output based
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

30 sec • 1 pt

What is the resulting x. int x=5/2;

2
2.5
2.0
None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code int a=2,b=3,c=4; if(a

hiNamastey
hi
Namastey
hello Namastey

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State the output of the below code: class Abc { int a; String c; Abc(int x, String y) { a=x; c=y; } public static void main() { Abc ob=new Abc(2,”!”); System.out.println(ob.a+”##“+ob.c+”##“); }}

2**null
Error
null**null
2##!##

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code segment: int x[ ]={4,3,7,8,9,10}; System.out.print(x.length+” “); System.out.print(x[1]+x[4] * x[3]);

6 83
6 75
5 75
5 83

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output for the following program segment? int a=0,b=30,c=40; a= --b + c++ +b; System.out.println("a="+a);

96
98
99
100

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expressions, if the values of the variables are a=2, b=3 and c=9: (a) a-(b++)*(--c) (b) a*(++b)%c

22 8
-22 -8
22 -8
-22 8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a=5, b=9, calculate the value of a+=a++ - ++b +a.

8
7
9
6

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?