Sei sulla pagina 1di 19

FLOW CHART

1.
Study the flowchart shown below to answer the following questions.

Which of the following value will be printed if the value of N = 0?

a. 0 b. 720 c. 5040 d. None of these

Ans: d
2.
A. All the following will make a candidate eligible to get a technical job, except:
a. The one who is interested in CAT
b. The one who has cleared telephonic interview
c. The one who is interested in GATE
d. The one who has cleared written test

Ans:

B. In which of the following cases job will not be offered to a candidate?


a. When percentage of the candidate is greater than 60%
b. When the percentage of the candidate is less than 60%
c. When the candidate has cleared the written test
d. When candidate has cleared the telephonic interview

Ans:

C. What are the minimum number of stages by which a candidate will get offered?
a. 4
b. 5
c. 6
d. 3

Ans:

D. For the given flow chart, in which of the following cases will the recruitment
process fail?
a. If the candidate is not able to clear the written test
b. If the candidate is interested in GATE
c. If the candidate is interested in CAT and GATE
d. If the candidate is interested in CAT

Ans:
3. Study the flow chart give below and the questions that follow

Question: At the end of the flow chart the number placed in which of the following boxes
will remain unchanged?

A. Box 3
B. Box 10
C. Box 2
D. Box 7

Ans: D
Explanation:
In instruction 1, Box 10 is modified;
In instruction 3, Box 2 is modified;
and in instruction 5, Box 3 gets modified;
Therefore out of given options only Box 7 remains unchanged.
4. Is the following statement True or False

Statement:
If the condition in Step C updates the value in Box 3 instead of Box 2, then the flow chart
will enter into infinite loop.

A. TRUE
B. FALSE
C. Cannot be determined

Ans: B
Explanation:
Even if Box 3 is updated instead of Box 2 in instruction C,
In instruction D, Number in Box 2 is compared with Box 7 and the value is greater anyway,
so the result is YES there and thus exiting and finishing the loop.
5. Study the flow chart give below and the questions that follow.

The purpose of the following chart is to put a zero in each of the boxes 2, 4 and 6. In
order to accomplish exactly this - no more and no less - Which number must be in box 3?

A. 0
B. 6
C. 10
D. 3
E. 8

Ans: E
Explanation:
The instruction 1 gets modified as long as the condition becomes false.
Step 1 - Defines (on the first occurrence) and executes the instruction
Step 2 - Modifies the instruction
Step 3 - Does an evaluation
On each loop, the box 2, 4, 6, 8, 10... gets filled with 0. We need to limit it until 6 only.

When the last box count becomes 6, we need to execute the instruction. So, box 3 should
not have 6. After executing instruction, it updates the box number to 8. Here, we need to
break.

So, box 3 should contain 8.


6. Study the flow chart give below and the questions that follow.

What number is now in Box 8?


What number is now in box 11?
A. 11, 5
B. 11, 2
C. 8, 6
D. 11, 9
E. None of these.

Ans: E
Explanation:
Step 1 : ins 1 : 2[Box 11] 3 = 5[Box 11]

Step 2 : ins 2 : 8[Box 1] -> 8[Box 10]

Step 3 : ins 3 : is 1 an odd number? YES

Step 4 : ins 4 : go to instruction 6[Box 2[Box 6]]

Step 5 : ins 6 : 4[Box 5] 5[Box 11] = 9[Box 11]

Step 6 : ins 7 : change ins2: [Box 1 1] -> [Box 10 - 1]

Step 7 : ins 8 : 9 < 8[Box 1] ? NO

Step 8 : ins 9 : go to instruction 2

Step 9 : ins 2 : 6[Box 2] -> 6[Box 9]

Step 10 : ins 3 : is 2 an odd number? NO

Step 11 : ins 6 : 4[Box 5] 9[Box 11] = 13[Box 11]

Step 12 : ins 7 : change ins2: [Box 2 1] -> [Box 9 - 1]

Step 13 : ins 8 : 8 < 8[Box 1] ? NO

Step 14 : ins 9 : go to instruction 2

Step 15 : ins 2 : 5[Box 3] -> 5[Box 8]

Step 16 : ins 3 : is 3 an odd number? YES

Step 17 : ins 4 : go to instruction 6[Box 2[Box 6]]

Step 18 : ins 6 : 4[Box 5] 13[Box 11] = 17[Box 11]

Step 19 : ins 7 : change ins2: [Box 3 1] -> [Box 8 - 1]

Step 20 : ins 8 : 7 < 8[Box 1] ? YES

ANSWER: 5[Box 8] and 17[Box 11]


Hence None of the available answers is the correct.
7. Study the flow chart give below and the questions that follow.

The purpose of the following chart is to double the number in each of the boxes 2, 4, 6, 8
and 10. In order to accomplish exactly this - no more and no less - What is the smallest
number which may be in box 1?

A. 19
B. 15
C. 9
D. 11

Ans: D
Explanation:
FYI "box number" is not same as number in the "number in the box"

In above case during last iteration, the second box number is 12 which should be greater
than number in the box 1. i.e. it should be 11.

[Box 12] > 11 [Box 1]


8. Study the flow chart give below and the questions that follow.

A. 27
B. 23
C. 12
D. 34
Ans: A
Explanation:
Instruction 1 : 0 [Box 3] + 1 [Box 11] = 1 [Box 11]
Instruction 2 : 1 [Box 1] + 1 [Box 11] = 2 [Box 5]
Instruction 3 : 3 [Box 4] * 3 [Box 4] = 9 [Box 4]
Instruction 4 : IS 2 [Box 5] = 6 [Box 10] ? NO
Instruction 5 : 9 [Box 4] - 6 = 3 [Box 4]
Instruction 6 : 2 [Box 5] + 2 [Box 2] = 4 [Box 5]
Instruction 3 : 3 [Box 4] * 3 [Box 4] = 9 [Box 4]
Instruction 4 : IS 4 [Box 5] = 6 [Box 10] ? NO
Instruction 5 : 9 [Box 4] - 6 = 3 [Box 4]
Instruction 6 : 4 [Box 5] + 2 [Box 2] = 6 [Box 5]
Instruction 3 : 3 [Box 4] * 3 [Box 4] = 9 {box 4]
Instruction 4 : IS 6 [Box 5] = 6 [Box 10] ? YES
Instruction 7 : 24 [Box 7] - 6 [Box 5] = 18 [Box 8]
Instruction 8 : 9 [Box 4] + 18 [Box 8] = 27 [Box 6]
ANSWER Box 6 = 27
9. Study the flow chart give below and the questions that follow.

A. 19
B. 15
C. 11
D. 14
Ans: D
Explanation:
Instruction 1 : 5 [Box 4] + 2 [Box 10] = 3 [Box 1]
Instruction 2 : 3 [Box 1] + 3 [Box 6] = 6 [Box 1]
Instruction 3 : IS 6 [Box 1] evenly divisible by 4? = NO
Instruction 4 : 6 [Box No.] + 3[Box 6] = 9 [Box No.]
Instruction 5 : IS 13 [Box 2] > 9[Box No.] ? = YES
Instruction 6 : 7[Box 9] - 1 = 6 [Box 9]
Instruction 2 : 6 [Box 1] + 6 [Box 9] = 12 [Box 1]
Instruction 3 : IS 12 [Box 1] evenly divisible by 4? = NO
Instruction 4 : 9[Box No.] + 3[Box 6] = 12[Box No.]
Instruction 5 : IS 13 [Box 2] > 12 [Box No.] ? = YES
Instruction 6 : 6 [Box 9] -1 = 5 [Box 9]
Instruction 2 : 12 [Box 1] + 2 {Box 12] =14[Box 1]
Instruction 3 : IS 14 [Box 1] evenly divisible by 4? = NO
Instruction 4 : 12 [Box No.] + 3 [Box 6] = 15 [Box No.]
Instruction 5 : IS 13 [Box 2] > 15 [Box No.] ? = NO
ANSWER Box 1 = 14
10. The purpose of the following flowchart is to add the numbers in boxes 6, 7, 8, and 9
and put the total into box 3.

In order to accomplish exactly this - no more and no less - what number must be in box
4?

A. 19
B. 15
C. 11
D. 14
Ans: B
Explanation:
If Box 4 = 7
Instruction 1 : 5[ Box 1] - 5 [Box 1] = 0 [Box 3]
Instruction 2 : 0 [Box 3] + 3 {Box 9] = 3 [Box 3]
Instruction 3 : IS 7[Box 4] > 9[Box No.] ? = NO
Instruction 4 : 9 [Box No.] - 1 = 8 [Box No.]
Instruction 2 : 3 [Box 3] + 7 [Box 8] = 10 [Box 3]
Instruction 3 : IS 7[Box 4] > 8[Box No.] ? = NO
Instruction 4 : 8 [Box No.] - 1 = 7 [Box No.]
Instruction 2 : 10 [Box 3] + 6 [Box 7] = 16 [Box 3]
Instruction 3 : IS 7[Box 4] > 7[Box No.] ? = NO
Instruction 4 : 7 [Box No.] - 1 = 6 [Box No.]
Instruction 2 : 16 [Box 3] + 8 [Box 6] = 24 [Box 3]
Instruction 3 : IS 7[Box 4] > 6[Box No.] ? = YES
ANSWER Box 4 = 7
11. The purpose of the following flow chart is to double the number in each of the Boxes
2, 4, 6, 8 and 10.

In order to accomplish exactly this - no more and no less - What is the smallest number
which may be in box 1?

A. 43
B. 12
C. 10
D. 11
Ans: C
Explanation:
Assume Box 2 has number 2, Box 3 has number 3 and so on.
And Box 1 has number 10
Instruction 1 : 2 [Box 2] + 2[Box 2] = 4[Box 2]
Instruction 2 : 2 [Box No.] + 2 = 4 [Box No.]
Instruction 3 : IS 10 [Box 1] < 4 [Box No.] ? NO
Instruction 1 : 4 [Box 4] + 4{Box 4] = 8[Box 4]
Instruction 2 : 4 [Box No.] + 2 = 6 [Box No.]
Instruction 3 : IS 10 [Box 1] < 6 [Box No.] ? NO
Instruction 1 : 6 [Box 6] + 6 [Box 2] = 12[Box 6]
Instruction 2 : 6 [Box No.] + 2 = 8 [Box No.]
Instruction 3 : IS 10 [Box 1] < 8 [Box No.] ? NO
Instruction 1 : 8 [Box 8] + 8 [Box 8] = 16[Box 8]
Instruction 2 : 8 [Box No.] + 2 = 10 [Box No.]
Instruction 3 : IS 10 [Box 1] < 10 [Box No.] ? NO
Instruction 1 : 10 [Box 10] + 10 [Box 10] = 20[Box 10]
Instruction 2 : 10 [Box No.] + 2 = 12 [Box No.]
Instruction 3 : IS 10 [Box 1] < 12 [Box No.] ? YES
ANSWER is 10
12. Study the flow chart give below and the questions that follow.

A. 4
B. 2
C. 6
D. 9
E. 1
Ans: A
Explanation:
Assume Box 2 has number 2, Box 3 has number 3 and so on.
And Box 10 has number 4
Instruction 1 : 5 [Box 5] - 5 [Box 5] = 0 [Box 5]
Instruction 2 : 1 [Box 1] + 0 [Box 5] = 1[Box 5]
Instruction 3 : IS 1 [Box No.] < 4 [Box 10] ? YES
Instruction 4 : 1 [Box 5] + 9 [Box 9] = 10 [Box 5]
Instruction 5 : 1 [Box No.] + 1 = 2[Box No.]
Instruction 6 : 9 [Box No.] - 1 = 8 [ Box No.]
Instruction 2 : 2 [Box 2] + 10 [Box 5] = 12 [Box 5]
Instruction 3 : IS 2 [Box No.] < 4 [Box 10] ? YES
Instruction 4 : 12 [Box 5] + 8 [Box 8] = 20 [Box 5]
Instruction 5 : 2 [Box No.] + 1 = 3 [Box No.]
Instruction 6 : 8 [Box No.] - 1 = 7 {box No.]
Instruction 2 : 3 [Box No.] + 20 [Box 5] = 23 [Box 5]
Instruction 3 : IS 3 [Box No.] < 4 [Box 10] ? YES
Instruction 4 : 23 [Box 5] + 7 [Box 7] = 30 [Box 5]
Instruction 5 : 3 [Box No.] + 1 = 4 [Box No.]
Instruction 6 : 7 [Box No.] - 1 = 6 [Box No.]
Instruction 2 : 4 [Box 4] + 30 [Box 5] = 34 [Box 5]
Instruction 3 : IS 4 [Box No.] < 4 [Box 10] ? NO
ANSWER Box 10 = 4

Potrebbero piacerti anche