PU Day 1 assessments - Srinivas's batch

PU Day 1 assessments - Srinivas's batch

Professional Development

10 Qs

quiz-placeholder

Similar activities

C Operators

C Operators

University - Professional Development

15 Qs

QUIZ 3DSMB 28.07

QUIZ 3DSMB 28.07

Professional Development

10 Qs

Công nghệ Java_Test1

Công nghệ Java_Test1

Professional Development

15 Qs

Desafío Java fácil

Desafío Java fácil

Professional Development

10 Qs

Quiz - 2

Quiz - 2

Professional Development

9 Qs

Python Test 3A

Python Test 3A

Professional Development

10 Qs

Flutter_Q5

Flutter_Q5

Professional Development

10 Qs

Java_3

Java_3

Professional Development

5 Qs

PU Day 1 assessments - Srinivas's batch

PU Day 1 assessments - Srinivas's batch

Assessment

Quiz

Professional Development

Professional Development

Easy

Created by

training atomm

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class selection_statements

  2. {

  3. public static void main(String args[])

  4. {

  5. int var1 = 5;

  6. int var2 = 6;

  7. if ((var2 = 1) == var1)

  8. System.out.print(var2);

  9. else

  10. System.out.print(++var2);

  11. }

  12. }

1
6
5
2

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class TestOutput

  2. {

  3. public static void main(String args[])

  4. {

  5. int a = 10;

  6. int b = 20;

  7. if (a < b)

  8. System.out.print(a + b);

  9. else

  10. System.out.print(a - b);

  11. }

  12. }

30

-10

10

20

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class CompareValues

  2. {

  3. public static void main(String args[])

  4. {

  5. int x = 15;

  6. int y = 15;

  7. if (x == y)

  8. System.out.print("Equal");

  9. else

  10. System.out.print("Not Equal");

  11. }

  12. }

Equal

Error

Not Equal

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class LoopExample

  2. {

  3. public static void main(String args[])

  4. {

  5. for (int i = 0; i < 3; i++)

  6. System.out.print(i);

  7. }

  8. }

  9. }

321

None

123

012

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the following do-while loop execute?

int i = 1;

do {

System.out.println(i);

i++;

} while(i <= 5);

5
6
4
3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class StringComparison

  2. {

  3. public static void main(String args[])

  4. {

  5. String str1 = "Hello";

  6. String str2 = "Hello";

  7. if (str1.equals(str2))

  8. System.out.print("Match");

  9. else

  10. System.out.print("No Match");

  11. }

  12. }

None of the above

Match

Error

No Match

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. class ConditionalCheck

  2. {

  3. public static void main(String args[])

  4. {

  5. int num = 8;

  6. if (num % 2 == 0)

  7. System.out.print("Even");

  8. else

  9. System.out.print("Odd");

  10. }

  11. }

Even

Odd

None of the above

Error

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?