wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C Variables and Constants

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

In programming, a _______ is a container (storage area) to hold data.

a)

variable

b)

variant

c)

variance

d)

variated

2.

To indicate the storage area, each variable should be given a unique name (identifier).

a)

True

b)

False

3.

A constant is a value or an identifier whose value cannot be altered in a program.

a)

True

b)

False

4.

It is a numeric constant (associated with number) without any fractional or exponential part.

a)

Integer Constant

b)

Floating Point Constant

c)

Character Constant

d)

String Constant

5.

These are the constants which are enclosed in a pair of double-quote marks.

a)

Integer Constants

b)

Floating Point Constants

c)

Character Constants

d)

String Constants

6.

It is a constant which uses single quotation around characters.

a)

Integer Constant

b)

Floating Point Constant

c)

Character Constant

d)

String Constant

7.

It is a numeric constant that has either a fractional form or an exponent form.

a)

Integer Constant

b)

Floating Point Constant

c)

Character Constant

d)

String Constant

8.

The given variable name is correct:


7ABGrade

a)

True

b)

False

9.

The given variable name is correct:


Grade7AB

a)

True

b)

False

10.

The given variable name is correct:


num1

a)

True

b)

False