Condition Statements -1

Condition Statements -1

University

8 Qs

quiz-placeholder

Similar activities

NETIQUETTE AND DIGITAL FOOTPRINT

NETIQUETTE AND DIGITAL FOOTPRINT

University

10 Qs

JSPS Competition Hackathon - Scratch Language - Grade 1

JSPS Competition Hackathon - Scratch Language - Grade 1

2nd Grade - University

10 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

Information Technology & Business Canvas Model

Information Technology & Business Canvas Model

University

13 Qs

ICT450-TOPIC 1

ICT450-TOPIC 1

University

12 Qs

SCPK_Quiz 1

SCPK_Quiz 1

University

10 Qs

Video Watermaking

Video Watermaking

University

11 Qs

OCS752_CP_MODEL 1_PART B (16.10.2020)

OCS752_CP_MODEL 1_PART B (16.10.2020)

University

10 Qs

Condition Statements -1

Condition Statements -1

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

cgokul CELL-HICET

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the code snippet and select the correct output

if(true && false && true || false)

System.out.println("True.");

else

System.out.println("False");

True

False

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of following program?

public class temp{

public static void main(String args[]) {

int x=1;

if((boolean)x==true)

System.out.println("True.");

else

System.out.println("False.");

}

}

True

False

Error

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

public class temp

{

public static void main(String args[])

{

int ok=10;

switch(ok)

{

default:

System.out.println("default");

case 0:

System.out.println("true");

case 1:

System.out.println("false");

}

}

}

default

Error

true false default

default true false

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

public class temp

{

public static void main(String args[])

{

boolean ok=true;

switch(ok)

{

case true:

System.out.println("true");

break;

case false:

System.out.println("false");

break;

default:

System.out.println("default");

break;

}

}

}

Error

true

false

default

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

public class temp

{

public static void main(String args[])

{

int x=1;

if(x)

System.out.println("True");

else

System.out.println("False");

}

}

True

False

Error

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

public class temp

{

public static void main(String args[])

{

int x=10;

System.out.println( ((x=5)?"yes":"no") );

}

}

yes

no

Error

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

double x = 6.2;

if(x-- >= 6.0)

System.out.print("first ");

if(--x >= 5.0)

System.out.print("second ");

if(x-- >= 4.0)

System.out.print("third ");

else

System.out.print("fourth ");

first second third

first second fourth

first fourth

first third

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?