wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

escape sequence

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

\n is used for ______

a)

New line feed

b)

Horizontal tab

c)

Vertical tab

d)

Backspace

2.

The escape sequence character for horizontal tab which gives 8 spaces between words when used ________

a)

\n

b)

\v

c)

\b

d)

\t

3.

____________ is the functional and fundamental unit of a computer program

a)

ASCII code

b)

UNICODE

c)

Escape sequence

d)

Token

4.

Java character set consists of

a)

Letters

b)

Digits

c)

Operators

d)

Delimiters

e)

All of the above

5.

____________ is the functional and fundamental unit of a computer program

a)

ASCII code

b)

UNICODE

c)

Escape sequence

d)

Token

6.

Predict the output


'2'+'3'

a)

101

b)

23

c)

32

d)

1001

7.

Predict the output


2+3

a)

23

b)

101

c)

5

d)

None of these

8.

Identify the Conversion


a) double d=23.67

int a= (int) d;

a)

implicit

b)

explicit

c)

none of these

9.

Identify the conversion

a) int a=45;

long b = a;

a)

implicit

b)

explicit

c)

none of these

10.

Where does a variable that is declared inside a method exist?

a)

only in that method

b)

only in the class the method is in

c)

only in methods that declare the variable

d)

as long as the program is running

11.

What is scope?

a)

the part of a program where the variable exists

b)

a minty mouthwash

c)

a device used to aim a projectile

d)

a device in a submarine that is used to view the surface

12.

What characters denote a block?

a)

< >

b)

[ ]

c)

{ }

d)

( )