wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Computer Science Slip test 3

Total questions: 15

Worksheet time: 11mins

Name
Class
Date
1.

The part of a program that can see or use the variables are called________

a)

Parameter

b)

Scope

c)

Fucntion

d)

Indentation

2.

How many variables can be mapped to the same instance?

a)

2

b)

3

c)

4

d)

Multiple

3.

Which of the following keeps track of all these mappings with namespaces?

a)

Programming Languages

b)

Application software

c)

System software

d)

Mysql

4.

Which of the following rule is used to decide the order in which the scopes are to be searched for scope resolution?

a)

LEGB

b)

LGEB

c)

LBEG

d)

LGBE

5.

How the names are mapped with obejcts in programming language?

a)

name ==object

b)

name: : object

c)

name:=object

d)

object:=name

6.

How many types of variable scope are there?

a)

2

b)

4

c)

3

d)

6

7.

Which of the following is not a variable scope?

a)

Global

b)

Enclosed

c)

List

d)

Built-in

8.

Choose the type of scope for a variable 'a' defined in the following program. Disp():

a:=7

print a

Disp()

a)

Global

b)

Enclosed

c)

Local

d)

Built-in

9.

A variable which is declared outside all the functions in a program is known as _______

a)

Local

b)

Global

c)

Enclosed

d)

Built-in

10.

Which of the following variable can be inside /outside of all the functions in a program?

a)

Local

b)

Global

c)

Enclosed

d)

Built-in

11.

The duration for which a variable is alive is called its _______.

a)

End time

b)

Life time

c)

SCope time

d)

Visible time

12.

The scope of a _________ is that part of the code where it is visible.

a)

Keyword

b)

Variable

c)

Function

d)

Operator

13.

A function always first look up for a variable name in its scope.

a)

Local

b)

Enclosed

c)

Global

d)

Built-in

14.

Scope refers to the visibility of

a)

Variables

b)

Parameters

c)

functions

d)

All of these

15.

The inner function can access the variable of the outer function.This is called ______ scope.

a)

Local

b)

Function

c)

Enclosed

d)

Global