Logical Reasoning :: Flow Chart

Home > Logical Reasoning > Flow Chart > General Questions

NA
SHSTTON
198
Solv. Corr.
248
Solv. In. Corr.
446
Attempted
0 M:35 S
Avg. Time

1 / 42

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


capgemini-flow-chart-mock-test-reasoning

ABox 3

BBox 10

CBox 2

DBox 7

 View Answer |  Discuss in Forum |  Workspace | Asked In CapgeminiThoughtWorks |

Answer: Option D

Explanation:

ANSWR d)Box 7
Explanation :

In instruction 1, Box 10 is modified;
In instruciton 3, Box 2 is modified;
 and in instruction 5, Box 3 gets mofied;

Therefore out of given options only Box 7 remains unchanged.

Workspace

NA
SHSTTON
278
Solv. Corr.
213
Solv. In. Corr.
491
Attempted
1 M:44 S
Avg. Time

2 / 42

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


capgemini-flow-chart-mock-test-reasoning

ATRUE

BFALSE

CCannot be determined

Answer: Option B

Explanation:

Answer b)FALSE

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 anyway greater, so the result is YES there and thus exiting and finishing the loop.

Workspace

NA
SHSTTON
89
Solv. Corr.
427
Solv. In. Corr.
516
Attempted
2 M:38 S
Avg. Time

3 / 42

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?


capgemini-flow-chart-logical-reasoning-question-Answers-part-3

A0

B6

C10

D3

E8

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorks |

Answer: Option D

Explanation:

The answer is E.



The instruction 1 gets modified as long as the condition becomes false.



Step 1 defines (on the first occurance) 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.

Workspace

NA
SHSTTON
173
Solv. Corr.
187
Solv. In. Corr.
360
Attempted
5 M:20 S
Avg. Time

4 / 42

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?


capgemini-flow-chart-logical-reasoning-question-Answers-4

A11, 5

B11, 2

C8, 6

D11, 9

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorksSopra Steria |

Answer: Option D

Explanation:

None of the available answers is the correct:



 



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]

Workspace

NA
SHSTTON
55
Solv. Corr.
233
Solv. In. Corr.
288
Attempted
3 M:12 S
Avg. Time

5 / 42

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 ?


capgemini-flow-chart-logical-reasoning-question-Answers-part-4

A19

B15

C9

D11

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorks |

Answer: Option A

Explanation:

Assume [Box 1]= 19



Instruction 1: 2[Box 2] 2[Box 2] = 4[Box 2​]



Instruction 2: [Box 2] 2 = [Box 4] // increase box num from 2 to 4.



Instruction 3: IS [Box 1] 19 < [Box 2] 4  NO



 



Instruction 1: 4[Box 4] 4[Box 4] = 8[Box 4​]



Instruction 2: [Box 4] 2 = [Box 6]



Instruction 3: IS [Box 1] 19 < [Box 4] 8  NO



 



Instruction 1: 6[Box 6] 6[Box 6] = 12[Box 6]



Instruction 2: [Box 6] 2 = [Box 8] 



Instruction 3: IS [Box 1] 19 < [Box 6]12  NO



 



 



Instruction 1: 8[Box 8] 8[Box 8] = 16[Box 8​]



Instruction 2: [Box 8] 2 = [Box 10] 



Instruction 3: IS [Box 1] 19 < [Box 8]16  NO



 



 



Instruction 1: 10[Box 10] 10[Box 10] = 20[Box 10​]



Instruction 2: [Box 10] 2 = [Box 12]



Instruction 3: IS [Box 1] 19 < [Box 10] 20  YES



END



SO the ans should be 19//option A



// If you put [Box 1] = 9 then instruction end @ Instruction 3: IS [Box 1] 9 < [Box 6]12  Yes



//  If you put [Box 1] = 11 then instruction end @ Instruction 3: IS [Box 1] 11 < [Box 6]12  Yes



// If you put [Box 1] = 15 then instruction end @ Instruction 3: IS [Box 1] 15 < [Box 8]16  Yes



As per mention above we have to double 2,4,6,8,10 value...so loop never ends before updating upto



[Box 10] thats why our ans become 19

Workspace

NA
SHSTTON
120
Solv. Corr.
149
Solv. In. Corr.
269
Attempted
5 M:28 S
Avg. Time

6 / 42

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


capgemini-flow-chart-logical-reasoning-question-Answers-5

A27

B23

C12

D34

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorks |

Answer: Option 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

Workspace

NA
SHSTTON
39
Solv. Corr.
174
Solv. In. Corr.
213
Attempted
4 M:39 S
Avg. Time

7 / 42

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


capgemini-flow-chart-logical-reasoning-question-Answers-6

A19

B15

C11

D14

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorksSopra Steria |

Answer: Option 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

Workspace

NA
SHSTTON
63
Solv. Corr.
147
Solv. In. Corr.
210
Attempted
2 M:10 S
Avg. Time

8 / 42

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?


throughtworks-flow-chart-logical-reasoning-question-Answers-8

A4

B7

C6

D8

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorks |

Answer: Option 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

Workspace

NA
SHSTTON
59
Solv. Corr.
135
Solv. In. Corr.
194
Attempted
3 M:6 S
Avg. Time

9 / 42

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?


throughtworks-flow-chart-logical-reasoning-question-Answers-08

A43

B12

C10

D11

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorks |

Answer: Option 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

Workspace

NA
SHSTTON
36
Solv. Corr.
127
Solv. In. Corr.
163
Attempted
0 M:0 S
Avg. Time

10 / 42

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


throughtworks-flow-chart-logical-reasoning-question-Answers-10

A4

B2

C6

D9

E1

 View Answer |  Discuss in Forum |  Workspace | Asked In ThoughtWorksSopra Steria |

Answer: Option 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

Workspace