Question 52Asked in UGC NET Computer Science, June 2014 (Paper II & III, Selected Questions)

The output generated by the LINUX command: $ seq 1 2 10 will be

  1. A1 2 10
  2. B1 2 3 4 5 6 7 8 9 10
  3. C1 3 5 7 9
  4. D1 5 10
Show answerHide answer

Correct answer: (C) 1 3 5 7 9

Explanation

In Linux the seq command prints a sequence of numbers from FIRST to LAST in steps of INCREMENT: seq FIRST INCREMENT LAST. If FIRST or INCREMENT is omitted, it defaults to 1. Here FIRST = 1, INCREMENT = 2 and LAST = 10, so the output is 1 3 5 7 9 (each number on its own line). Hence the answer is (c).

From UGC NET Computer Science PYQ, June 2014 (Paper II & III, Selected Questions)

This is question 52 of UGC NET Computer Science PYQ, June 2014 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.