Input Output Reasoning Aptitude Questions with Answers
Last updated 2026-11-19
In input-output questions a machine takes a list of words or numbers and rearranges it in steps. You are shown one input with its steps, you work out the hidden rule, and then you apply it to a new input or find a particular step. The questions look intimidating because the rule is never stated, but only a handful of rules are ever used: sorting, swapping positions, applying arithmetic to every item, or reversing.
This page shows how to spot each rule type and works through 12 questions from easy to hard. For practice with hidden rules on letters, see coding-decoding. For the broader paper, read how to crack a logical reasoning test.
Common rule families
- Sorting by a key: ascending or descending numbers, alphabetical order, word length or digit sum, one item moved per step.
- Position swaps: pairs of positions exchange places in a repeating pattern.
- Arithmetic on values: the same operation (add, double, subtract) is applied to every number, often alternating by step.
- Reversal: the letters inside each word are reversed, or the order of the words is reversed.
- Mixed rules: odd numbers first and even numbers next, or words first and numbers next.
How to find the rule
Compare the input with Step I and ask what has moved. If only one item has moved to an end, you have a selection-type sort. If every item has changed value by the same rule, it is arithmetic. If items have swapped places in pairs, label positions 1, 2, 3, 4 and track where each position goes. Then confirm the rule on Step II before applying it to the new input. A rule that fits only the first step is usually incomplete.
Working to the answer
Write each step in full, one line per step. Skipping lines is the commonest cause of errors, particularly for sorts where the next item to move depends on what is left. When a question asks for the number of steps, stop when the arrangement stops changing, and count only the steps that changed something.
Input Output Reasoning Aptitude Questions with Answers: questions with worked answers
1 A machine arranges numbers as follows. Input: 52 17 38 9. Step I: 9 52 17 38. Step II: 9 17 52 38. Step III: 9 17 38 52. For the input 40 15 30 5 22, how many steps are needed to complete the arrangement?
easyThe rule is: in each step the smallest remaining number moves to the next position from the left, and the others keep their order. Step I: 5 40 15 30 22. Step II: 5 15 40 30 22. Step III: 5 15 22 40 30. Step IV: 5 15 22 30 40, which is in ascending order. Answer: 4 steps.
2 A machine works as follows. Input: tree house river sun moon. Step I: house tree river sun moon. Step II: house moon tree river sun. Step III: house moon river tree sun. What is the final step, Step IV?
easyThe rule is: in each step the word that comes next in alphabetical order is moved into the next position from the left. In Step III, the first three positions hold house, moon, river. The remaining words are tree and sun, and alphabetically sun comes before tree. Step IV: house moon river sun tree. Answer: house moon river sun tree.
3 A machine reverses the letters of each word in Step I and moves the first word to the end in Step II. Input: cat dog hen. What is Step II?
easyStep I reverses each word: tac god neh. Step II moves the first word, tac, to the end: god neh tac. Answer: god neh tac.
4 Rule: Step I arranges the odd numbers in ascending order followed by the even numbers in ascending order. Input: 18 7 25 10 3 14. What is Step I?
mediumOdd numbers are 7, 25, 3 and in ascending order 3, 7, 25. Even numbers are 18, 10, 14 and in ascending order 10, 14, 18. Step I: 3 7 25 10 14 18. Answer: 3 7 25 10 14 18.
5 A machine arranges numbers by the sum of their digits, smallest first. Input: 65 34 81 20. What is the output?
mediumDigit sums are 65 gives 11, 34 gives 7, 81 gives 9 and 20 gives 2. In ascending order of sum: 20 (2), 34 (7), 81 (9), 65 (11). Answer: 20 34 81 65.
6 Words are arranged by length, shortest first, one word per step. Input: orange pear mango fig. What is Step II?
mediumLengths are orange 6, pear 4, mango 5, fig 3. Step I moves the shortest, fig, to the left end: fig orange pear mango. Step II moves the next shortest, pear, to the second position: fig pear orange mango. Answer: fig pear orange mango.
7 A machine works as follows. Input: 5 8 3 10. Step I: 8 5 10 3. Step II: 10 3 8 5. Step III: 3 10 5 8. For the input 7 2 9 4, what is Step III?
mediumStep I swaps positions in pairs (1 with 2, and 3 with 4). Step II swaps position 1 with 3 and 2 with 4. Step III repeats the pair swap of Step I. Check on the example: Step II to Step III gives 10 3 8 5 becoming 3 10 5 8, which is a pair swap. For 7 2 9 4: Step I is 2 7 4 9. Step II is 4 9 2 7. Step III is 9 4 7 2. Answer: 9 4 7 2.
8 A machine works as follows. Input: 3 7 2 8. Step I: 4 8 3 9. Step II: 8 16 6 18. Step III: 9 17 7 19. For the input 5 2 6 1, what is Step III?
mediumStep I adds 1 to every number, Step II doubles every number, and Step III adds 1 again. Check Step III on the example: 8 16 6 18 becomes 9 17 7 19. For 5 2 6 1: Step I is 6 3 7 2, Step II is 12 6 14 4, Step III is 13 7 15 5. Answer: 13 7 15 5.
9 A machine works as follows. Input: banana fig apple kiwi. Step I: fig banana apple kiwi. Step II: fig kiwi banana apple. Step III: fig kiwi apple banana. For the input papaya fig guava pear, what is Step III?
hardThe rule is to arrange the words by number of letters, shortest first, one word per step. Check on the example: fig (3), kiwi (4), apple (5), banana (6). For papaya (6), fig (3), guava (5), pear (4): Step I moves fig to the front: fig papaya guava pear. Step II moves pear (4) to the second position: fig pear papaya guava. Step III moves guava (5) to the third position: fig pear guava papaya. Answer: fig pear guava papaya.
10 A machine rearranges numbers as follows. Input: 34 12 56 8 41 27. Step I: 56 34 12 8 41 27. Step II: 56 34 12 41 27 8. Step III: 56 41 34 12 27 8. Step IV: 56 41 34 27 12 8. For the input 25 70 10 45 90 60, what is Step II?
hardThe rule alternates: the largest number goes to the first position, the smallest goes to the last position, then the second largest goes to the second position, the second smallest goes to the second-last position, and so on. For 25 70 10 45 90 60: Step I moves 90 to the front: 90 25 70 10 45 60. Step II moves the smallest, 10, to the end: 90 25 70 45 60 10. Answer: 90 25 70 45 60 10.
11 A machine works as follows. Step I swaps the first and last numbers. Step II swaps the second and second-last numbers. Step II gives the output 9 2 7 4 5. What was the input?
hardUndo the steps in reverse order. Undoing Step II swaps the second and second-last numbers of 9 2 7 4 5: 9 4 7 2 5. Undoing Step I swaps the first and last: 5 4 7 2 9. Check: Step I on 5 4 7 2 9 gives 9 4 7 2 5, and Step II gives 9 2 7 4 5. Answer: 5 4 7 2 9.
12 Step I of a machine moves the largest number to the front, and each later step moves the next largest number to the next position. Input: 14 29 7 21. How many steps arrange the input in descending order?
hardDescending order is 29 21 14 7. Step I: 29 14 7 21. Step II moves 21 into the second position: 29 21 14 7. That is already descending, so no further step changes anything. Answer: 2 steps.
Frequently asked questions
How do I find the hidden rule?
Compare the input with Step I, note what moved or changed, and confirm the guess on Step II before applying it.
What if a rule fits Step I but not Step II?
It is incomplete. Look for a rule that alternates between steps or that moves items from both ends.
How do I count the number of steps?
Apply the rule one step at a time and stop when the arrangement stops changing, counting only steps that make a change.
Do I need to write every step?
Yes. Skipping lines is the most frequent cause of errors in sorting-type questions.
Related guides
More in Aptitude Questions for Placements
- Letter Series Aptitude Questions with Worked Solutions
- Logarithm aptitude questions with solutions
- Logical Puzzles Aptitude Questions with Solutions
- Mensuration aptitude questions with solutions
- Mixtures and alligation aptitude questions with solutions
- Number Series Aptitude Questions with Solutions
- Number system aptitude questions with solutions
- One Word Substitution Aptitude Questions with Answers
- Para Jumbles Aptitude Questions with Solutions
- Partnership aptitude questions with solutions
- Percentage aptitude questions with solutions
- Permutation and combination aptitude questions