wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Application Practice Quiz Class 10

Total questions: 20

Worksheet time: 3mins

Name
Class
Date
1.

Wrapping up of data and functions into a single unit called class is known as_____.

a)

Abstraction

b)

Inheritance

c)

Polymorphism

d)

Encapsulation

2.

interface is a ______ datatype.

a)

Primitive

b)

Composite

3.

Java expression for (under root of 2as+u2) is:

a)

Math.sqrt ( 2 * a * s + Math.pow ( u, 2 ) )

b)

Math.cbrt(2 x a x s) + u x 2

c)

Root over of 2 *a*S + u*u

d)

Math.sqrt ( 2 * a * s + Math.pow ( u, 2 ) );

4.

Multiplication operator used when the operation should be division.

What kind of error is this?

a)

Syntax error

b)

Typo

c)

Logical error

d)

Run-time error

5.

int arr[] = new int[10];

This statement declares an _____ array of _____elements.

a)

double, 10

b)

int, 10

c)

integer, 10

d)

point value, 10

6.

What is the output?

int a = 63, b = 36;

boolean x = (a < b ) ? true : false; int y= (a > b ) ? a : b ;

a)

x= true , y=65

b)

x= true y= 63

c)

x= false y= 64

d)

x= false y=63

7.

What will be the result stored in x after evaluating the following expression?



int x=4;

x += (x++) + (++x) + x;

a)

20

b)

21

c)

22

d)

15

8.

State the method that:

Converts a string to a primitive float data type

a)

float.parsefloat()String;

b)

Float.parseFloat(String)

c)

Float.Parsefloat(String);

d)

Float.parseFloat(String);

9.

What will the following code output?

String s = "malayalam";

System.out.println(s.indexOf('m'));


System.out.println(s.lastIndexOf('m'));

a)

0

8

b)

0 8

c)

1 7

d)

1

7

10.

A _______ is a constant data item.

a)

Number

b)

Character literal

c)

Literal

d)

None of the above

11.

int x =12; long y = x;

What kind of type casting is this?

a)

Explicit

b)

Implicit

12.

A class is a _____ an object.

a)

creator

b)

planner

c)

blueprint

d)

prototype

13.

Which element is represented by a[10]?

a)

9th

b)

10th

c)

11th

d)

1st

14.

Arrays are_____.

a)

Objects

b)

Object References

c)

Primitive datatype

d)

Identifiers

15.

An array element can be accessed through:

a)

Dot

b)

Name of the array

c)

Index Number

d)

All of the above

16.

int m[] = {2,4,6,8};

System.out.println(m[1] + " " + m[2]);

What is the output

a)

26

b)

2 6

c)

2

6

d)

none of the above

17.

The ______ function is executed first in a java program.

a)

first one in the order

b)

static functions

c)

main()

18.

char x = 'A' ; int m;

m=(x=='a') ? 'A' : ‘a’;

System.out.println("m="+m);

Give the output:

a)

9 7

b)

97

c)

9 6

d)

96

19.

What is the most appropriate definition of an object?

a)

Object is a blueprint of a class.

b)

Object is the prototype of a class.

c)

Object is an instance of a class.

d)

Object is the copy of a class

20.

Which one of these is incorrect?

a)

String objects are immutable.

b)

String objects are actually arrays of charcters.

c)

String is a primitive datatype.