wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

chapter-7 part-3

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)

(a) u, v = 5, 5

b)

(b) u, v = 10, 5

c)

(c) u, v = 5, 10

d)

(d) u, v = 10, 10

2.

Which of the following properties is true after the assignment (at line 3?

1. – – i + j = 0

2. i, j : = i + 1, j – 1

3. – – ?

a)

(a) i + j > 0

b)

(b) i + j < 0

c)

(c) i + j = 0

d)

(d) i = j

3.

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

a)

(a) S1

b)

(b) S2

c)

(c) S3

d)

(d) none

4.

If C is false just before the loop, the control flows through

a)

(a) S1 ; S3

b)

(b) S1 ; S2 ; S3

c)

(c) S1 ; S2 ; S2 ; S2 ; S3

d)

(d) S1 ; S2 ; S2 ; S2 ; S3

5.

If C is true, S1 is executed in both the flowcharts, but S2 is executed in

a)

(a) (1) only

b)

(b) (2) only

c)

(c) both (1) and (2)

d)

(d) neither (1) nor (2)

6.

How many times the loop is iterated?

i : = 0

while i ≠ 5

i : = i + 1

a)

(a) 4

b)

(b) 5

c)

(c) 6

d)

(d) 0

7.

There are important control flow statements.

a)

(a) four

b)

(b) three

c)

(c) two

d)

(d) five

8.

A ………………. statement is composed of a sequence of statements.

a)

(a) iterative

b)

(b) conditional

c)

(c) sequential

d)

(d) alternative

9.

After an algorithmic problem is decomposed into subproblems, we can abstract the subproblems as ……………….

a)

(a) refinement

b)

(b) pseudo – code

c)

(c) decomposition

d)

(d) functions

10.

Which one of the following notations will be executed by computers?

a)

(a) Flow chart

b)

(b) Pseudocode

c)

(c) Programming languages

d)

(d) Compiler