Preboard Revision

Preboard Revision

10th Grade

21 Qs

quiz-placeholder

Similar activities

Loops Quiz

Loops Quiz

9th - 12th Grade

16 Qs

Python - Quiz 2

Python - Quiz 2

10th - 11th Grade

20 Qs

Basic JavaScript Review

Basic JavaScript Review

9th - 12th Grade

20 Qs

קלט פלט משתנים והוראות השמה

קלט פלט משתנים והוראות השמה

7th Grade - University

20 Qs

Loops

Loops

5th - 12th Grade

16 Qs

APCSA Arrays

APCSA Arrays

9th - 12th Grade

20 Qs

type conversion

type conversion

10th Grade

22 Qs

Java Data Type

Java Data Type

6th - 10th Grade

16 Qs

Preboard Revision

Preboard Revision

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Roopa Pulapaka

Used 2+ times

FREE Resource

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what kind of error does this code snippet lead to -

int y = 0;

int x = 15/y;

logical

syntax

runtime

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what kind of error will this lead to?

int a[] = new int[5];

for (int i=0; i<6;i++) {

System.out.println(a[i]);

}

logical

runtime

syntax

no error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what kind of error is this?

double x = 5.5;

short y = x;

logical

syntax

runtime

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of error?

int Sum = 0

int x = sum;

logical

syntax

runtime

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the type of error?

String s = "catch the error";

System.out.println(s)

logical

syntax

runtime

no error

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In a program to find the maximum of 3 numbers, what is the type of error in the following code snippet?

int a = 2, b = 8, c = 6;

if (a > b && a > c)

System.out.println( a + " is the smallest Number");

else if (b > a && b > c)

System.out.println( b + " is the smallest Number")

else

System.out.println(c + " is the largest Number");

logical

syntax

runtime

no error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

public static void main(String[] args) {

        int num = 789; nt reversednum = 0;         int remainder = 0;  

        while (num != 0) {

             remainder = num / 10;

            reversednum = reversednum * 10  + remainder;

         num /= 10;

        }

        System.out.println("Reversed number is " + reversednum);             

    }


logical

syntax

runtime

no error

Answer explanation

to get the last digit

 num %= 10;

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?