NEW
Font size
Worksheetschapter-7 part-3
Total questions: 10
Worksheet time: 5mins
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 = 10, 5
(c) u, v = 5, 10
(d) u, v = 10, 10
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) i + j > 0
(b) i + j < 0
(c) i + j = 0
(d) i = j
If C1 is false and C2 is true, the compound statement
(a) S1
(b) S2
(c) S3
(d) none
If C is false just before the loop, the control flows through
(a) S1 ; S3
(b) S1 ; S2 ; S3
(c) S1 ; S2 ; S2 ; S2 ; S3
(d) S1 ; S2 ; S2 ; S2 ; S3
If C is true, S1 is executed in both the flowcharts, but S2 is executed in
(a) (1) only
(b) (2) only
(c) both (1) and (2)
(d) neither (1) nor (2)
How many times the loop is iterated?
i : = 0
while i ≠ 5
i : = i + 1
(a) 4
(b) 5
(c) 6
(d) 0
There are important control flow statements.
(a) four
(b) three
(c) two
(d) five
A ………………. statement is composed of a sequence of statements.
(a) iterative
(b) conditional
(c) sequential
(d) alternative
After an algorithmic problem is decomposed into subproblems, we can abstract the subproblems as ……………….
(a) refinement
(b) pseudo – code
(c) decomposition
(d) functions
Which one of the following notations will be executed by computers?
(a) Flow chart
(b) Pseudocode
(c) Programming languages
(d) Compiler
