wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Gr 10 Term 2 Final Exam

Total questions: 51

Worksheet time: 34mins

Name
Class
Date
1.

public class MyClass {

public static void main(String args[]) {

int x=10;

int y=25;

int z=x+y;

int j= y-x;

int gaith = y*x;

int khalid = y/x;

System.out.println("Sum of x+y = " + z);

System.out.println("difference of xy = " + j);

System.out.println("product of xy = " + gaith);

System.out.println("division of xy = " + khalid);

}

}

a)

Sum of x+y = 35

division of xy = 2

b)

Sum of x+y = 35

difference of xy = 15

c)

Sum of x+y = 35

difference of xy = 15

product of xy = 250

division of xy = 2

d)

product of xy = 250

division of xy = 2

2.

The values involved in any mathematical operations are known as ____________

a)

Operators

b)

Operands

c)

Symbols

d)

Tokens

3.

&& operator will return true value only if both the relational expressions involved returns the value

a)

true

b)

false

c)

both

d)

none of the above

4.

The output of the following statements will be

int a = 14; b= 4;

boolean x=(a>b)? true:false

a)

true

b)

false

c)

error

d)

none of the above

5.

int x = 10;

x = x + 5;

System.out.println(x);


What will be the output?

a)

15

b)

5

c)

55

d)

x5

6.

int x = 4.4;

int y = 5.5;

System.out.println(x == y);


What will be the output?

a)

4.4

b)

true

c)

false

d)

5.5

7.

arithmetic operators return a value. True or false?

a)

true

b)

false

8.

which description of these relational operators are incorrect?

a)

==(equal to)

b)

<(less than)

c)

>=(greater than)

d)

!=(less than equal to)

9.

What is the operator used for division in Java?

a)

*

b)

+

c)

_

d)

/

10.

What is the operator used for multiplication in Java?

a)

%

b)

*

c)

_

d)

+

11.

What is the operator used for subtraction in Java?

a)

+

b)

*

c)

_

d)

/

12.
Which operator is used to assign a value to a variable in JavaScript?
a)
==
b)
:=
c)
=
d)
=>
13.
Which operator is used to check both the value and type of a variable?
a)
==
b)
===
c)
!==
d)
!=
14.

What does the modulo operator % do in Java?

a)

Computes the product

b)

Computes the quotient

c)

Computes the sum

d)

Computes the remainder

15.

Which operator is used to assign values to variables in Java?

a)

&

b)

*

c)

=

d)

+

16.

What do relational operators do in Java?

a)

Check whether an expression is true or false

b)

Assign values to variables

c)

Perform arithmetic operations

d)

Check the relationship between two operands

17.

What is the purpose of logical operators in Java?

a)

To compute the remainder

b)

To assign values to variables

c)

To check the relationship between two operands

d)

To check whether an expression is true or false

18.

Which operator is used for addition in Java?

a)

*

b)

+

c)

%

d)

=

19.

Which operator is used to compare two values in Java?

a)

&

b)

*

c)

==

d)

+

20.

What does the '&&' operator do in Java?

a)

Performs logical AND operation

b)

Performs logical OR operation

c)

Performs logical NOT operation

d)

Performs logical XOR operation

21.

Operators are symbols that perform operations on variables and values.

a)

True

b)

false

22.

_________ are symbols that perform operations on variables and values.

a)

Operators

b)

Variable

c)

datatype

d)

value

23.

Identify the given java operators

a)

Arithmetic

b)

Assignment

c)

Logical

d)

Relational

24.

Identify the given java operators

a)

Arithmetic

b)

Assignment

c)

Logical

d)

Relational

25.

Identify the given java operators

a)

Arithmetic

b)

Assignment

c)

Logical

d)

Relational

26.

Identify the given java operators

a)

Arithmetic

b)

Assignment

c)

Logical

d)

Relational

27.

Which of these are Operators in Java

a)
  1. Arithmetic Operators

b)
  1. Assignment Operators

c)
  1. Relational Operators

d)
  1. Logical Operators

e)

Variable

28.

______ operators are used to perform arithmetic operations on variables and data such as * / % - +

a)

arithmetic

b)

logical

c)

relational

d)

Assignment

29.

__________operators are used in Java to assign values to variables. i=5

a)

Arithmetic

b)

Assignment

c)

Logical

d)

Relational

30.

Which of these is a identified as Assignment operator

a)

+

b)

=

c)

>

d)

&&

31.

int a = 7;

int b = 2 + a;

a)

b = 9

b)

b = 2

c)

b = 7

d)

b = 5

32.

What will print?

System.out.println( 4 / 2 );

a)

2

b)

0.25

c)

1

d)

4

33.

int x = 4;

x * 10;

Which will be the value now?

a)

x is now 40

b)

x is now 10

c)

x is still 4

d)

x is now 14

34.

Which of these are operators? + - X /

a)

Arithmetic operators

b)

Variables

c)

datatypes

d)

None of these

35.

int a = 10;

int b = 20;

int c = a+b;

System.out.println("Addition = "+c);

a)

10

b)

20

c)

30

d)

40

36.

int a = 10;

int b = 20;

int c = a*b;

System.out.println("Multiply = "+c);

a)

10

b)

120

c)

30

d)

40

37.

int a = 20;

int b = 10;

int c = a/b;

System.out.println("division = "+c);

a)

2

b)

120

c)

30

d)

40

38.

int a = 20;

int b = 10;

int c = a- b;

System.out.println("Subtraction = "+c);

a)

2

b)

120

c)

10

d)

40

39.

--------- is a symbol, that operates on operands and produce a result

a)

operands

b)

variables

c)

operators

d)

Ternary

40.

Choose 2 OPTIONS FOR logical operators

a)

And

b)

Less than

c)

OR

d)

Not Equal

41.

What is the result of 13<=13 ?

a)

True

b)

False

c)

Both true and false

d)

None

42.

The result of AND operator is always true, if both the conditions results are _____

a)

True

b)

False

43.

in Java every statement is end with _____?

a)

Comma

b)

Colon

c)

Semicolon

d)

Brace

44.

Java is case sensitive language.

a)

True

b)

False

45.

________are symbols that perform operations on variables and values.

a)

Variables

b)

values

c)

Operators

d)

Literals

46.

________operators are used to perform arithmetic operations on variables and data.

a)

Arithmetic Operators

b)

Assignment Operators

c)

Relational Operators

d)

Logical Operators

47.

________________ operators are used in Java to assign values to variables

a)

Arithmetic Operators

b)

Assignment Operators

c)

Relational Operators

d)

Logical Operators

48.

________operators are used to check the relationship between two operands

a)

Arithmetic Operators

b)

Assignment Operators

c)

Relational Operators

d)

Logical Operators

49.

____________________operators are used to check whether an expression is true or false.

a)

Arithmetic Operators

b)

Assignment Operators

c)

Relational Operators

d)

Logical Operators

50.

If a=2, b=5, c=3

Find result for : 8 * (a + b + c) – a % c

a)

80

b)

81

c)

77

d)

78

51.

What would the new value of A be?

A= 1+0

a)

1

b)

2

c)

3

d)

4