Anda di halaman 1dari 5

Input Output

In the questions related to this topic, you are expected to be the machine. You would be
told what processing has to be done. You would be given the input, your job would be give
the

output

in

accordance

to

the

input.

In the topic of input output there are primarily four types of operation that can be asked in a
particular

question.

The

four

operations

are

as

follows:

1. Ordering input according to given criteria, e.g. alphabetically, in increasing/decreasing


order etc.
2. Mathematical Manipulations on the output which would in this case obviously be
numerical. The operations could be doubling, squaring, adding.
3. Shifting or Interchanging positions of characters/alphabets/words etc., in the input
according to questions e.g. shift 1st character to last or interchange 1st & last etc.
4. Others like making an alphabet capital, replacing alphabet by corresponding number etc.
So, which out of these is being used can be decided as:
If words (of the input) do not change in the output after an operation, the operations is
either reordering or shifting. In this case check for rearrangement first, if it is not the
operations performed then check for shifting next.
If words (of the input) do change in the output, the operation is either Mathematical (if
numbers are used) or fall into category of other operations (if alphanumeric data is used).
Example 1) A computer rearranges a particular input using some operations 01, 02, 03, and
04.
Input: I
Step

01: arrival

have

long
long

waited
have

for

your

arrival.

waited

for

your

Step 02: long

arrival

waited

have

for

your

Step 03: Your

waited

arrival

have

for

long

have

arrival

for

long

Step 04: Waited

your

If step 4 gives I know you will not come back what step will have you back I come not will
know?
Solution: Since words remain unchanged here, so this is case of either rearrangement or
shifting.

So,

let

us

number

each

word

I = 1, have = 2, long = 3, waited = 4, for = 5, your = 6, arrival = 7


Input:

Step

01:

Step

02:

Step

03:

Step 04:

So,

the

Step

01

Step
Step

02

logic

following

Swap

Swap
=

1
being

=
=

03

1st

1st
&

Swap

&

2nd,
1st

as

last;
last

&

is
two
last,

2nd
&

3rd
2nd

follows:&

3rd

and

4th

&

3rd.

Step 04 = 1st & 2nd, last two, & 3rd and 4th.
Since after two steps operations again repeat and hence you can guess the 5 th, 6th, 7th steps.
Step 04:

I know you will not come back

Step 05:

back you know will not come I

Step 06:

You back will know not I come

Step 07:

Come will back know not I you

Step 08:

Will come know back not you I

Step 09:

I know come back not you will

Step 10:

Know I back come not will you

Step 11:

You back I come not will know

Hence step 11 is the answer.


Questions asked in Previous Year Exams
Directions (Q. 1-4): Study the following information carefully and answer the given
questions: (From IBPS PO/MT Exam 2012)

A word and number arrangement machine when given an input line of words and numbers
rearranges them following a particular rule in each step. The following is an illustration of
input and rearrangement. (All the numbers are two-digit numbers.)
Input: tall 48 13 rise alt 99 76 32 wise jar high 28 56 barn
Step I: 13 tall 48 rise 99 76 32 wise jar high 28 56 bam alt
Step II: 28 13 tall 48 rise 99 76 32 wise jar high 56 alt barn
Step III: 32 28 13 tall 48 rise 99 76 wise jar 56 alt barn high
Step IV: 48 32 28 13 tall rise 99 76 wise 56 alt barn high jar
Step V: 56 48 32 28 13 tall 99 76 wise alt barn high jar rise
Step VI: 76 56 48 32 28 13 99 wise alt barn high jar rise tall
Step VII: 99 76 56 48 32 28 13 alt barn high jar rise tall wise And Step VII is the last step of
the above input, as the desired arrangement is obtained.
As per the rules followed in the above steps, find out in each of the following questions the
appropriate step for the given input.
Input: 84 why sit 14 32 not best ink feet 51 27 vain 68 92 (All the numbers are two-digit
numbers.)
1. Which step number is the following output?
32 27 14 84 why sit not 51 vain 92 68 feet best ink
1) Step V
2) Step VI
3) Step IV
4) Step III
5) There is no such step.
2. Which word/number would be at 5th position from the right in Step V?
1) 14
2) 92
3) feet

4) best
5) why
3. How many elements (words or numbers) are there between 'feet' and '32' as they
appear in the last step of the output?
1) One
2) Three
3) Four
4) Five
5) Seven
4. Which of the following represents the position of why' in the fourth step?
1) Eighth from the left
2) Fifth from the right
3) Sixth from the left
4) Fifth from the left
5) Seventh from the left
Solutions (For Qns 1-4):
The machine rearranges words and numbers in the following way. Numbers are being
arranged from left side with the smallest number coming first and move subsequently so that
in the last step numbers are arranged in descending order. The words are arranged from
right side as they appear in English alphabetical order.

Input: 84 why sit 14 32 not best ink feet 51 27 vain 68 92


Step I: 14 84 why sit 32 not ink feet 51 27 vain 68 92 best
Step II: 27 14 84 why sit 32 not ink 51 vain 68 92 best feet
Step III: 32 27 14 84 why sit not 51 vain 68 92 best feet ink

Step IV: 51 32 27 14 84 why sit vain 6892 best feet ink not
Step V: 68 51 32 27 14 84 why vain 92 best feet ink not sit
Step VI: 84 68 51 32 27 14 why 92 best feet ink not sit vain
Step VII: 92 68 84 51 32 27 14 best feet ink not sit vain why
On the basis of above Output, The answers are :
Ans 1. 5
Ans 2. 4
Ans 3. 2; 27, 14 and best
Ans 4. 3; Step IV: 51 32 27 14 84 why sit vain 68 92 best feet ink not
The position of 'why' in this step is sixth from the left end

Anda mungkin juga menyukai