wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Sample Test -2

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Suppose u, v = 10 ,5 before the assignment. What are the values of u and v after the sequence of assignments?

1 u := v

2 v := u

a)

u, v = 5 ,5

b)

u, v = 5 ,10

c)

u, v = 10 ,5

d)

u, v = 10 ,10

2.

If C1 is false and C2 is true, the compound statement

1 if C1

2 S1

3 else

4 if C2

5 S2

6 else

7 S3

executes

a)

S1

b)

S2

c)

S3

d)

none

3.

How many times the loop is iterated?

i := 0

while i 5

i := i + 1

a)

4

b)

5

c)

6

d)

0

4.

Which of the following is one of the elementary problem solving Techniques?

a)

Decomposition

b)

Control flow

c)

Functions

d)

State

5.

Which is a mix of programming language-like constructs and plain?

a)

Pseudo code

b)

Flowchart

c)

Algorithm

d)

Decomposition

6.

Which translates the program into executable instruction?

a)

Statements

b)

Translator

c)

Linker

d)

None of these

7.

Which of the following is a diagrammatic notation for representing algorithms?

a)

Pseudo code

b)

Programming language

c)

Flow chart

d)

Source Code

8.

How many notations are there for representing algorithms?

a)

1

b)

2

c)

3

d)

4

9.

Testing the loop condition and executing the loop body once is called an

a)

Sequential

b)

Iteration

c)

Alternative

d)

Branching

10.

Which one of the following splits the problem into an exhaustive set of disjoint cases.

a)

Branching

b)

Iterative

c)

Case analysis

d)

Sequential