nerdexam
Linux_Foundation

LFCS · Question #551

Which of the following outputs will the command seq 10 produce?

The correct answer is B. The numbers 1 through 10 with one number per line. The seq command, when given a single argument N, prints numbers from 1 to N, each on a new line.

Submitted by krish.m· Apr 18, 2026Essential Commands

Question

Which of the following outputs will the command seq 10 produce?

Options

  • AA continuous stream of numbers increasing in increments of 10 until stopped.
  • BThe numbers 1 through 10 with one number per line.
  • CThe numbers 0 though 9 with one number per line.
  • DThe number 10 to standard output.

How the community answered

(24 responses)
  • B
    88% (21)
  • C
    4% (1)
  • D
    8% (2)

Why each option

The `seq` command, when given a single argument `N`, prints numbers from 1 to `N`, each on a new line.

AA continuous stream of numbers increasing in increments of 10 until stopped.

This describes a continuous process, not the discrete output of `seq`, and `seq` does not default to increments of 10.

BThe numbers 1 through 10 with one number per line.Correct

The `seq` command generates sequences of numbers. When invoked with a single argument, it defaults to starting at 1, incrementing by 1, and ending at the specified number. Therefore, `seq 10` will output the integers from 1 to 10, each on its own line.

CThe numbers 0 though 9 with one number per line.

The `seq` command defaults to starting at 1, not 0, when only an end number is provided.

DThe number 10 to standard output.

This only outputs the final number; `seq` generates a sequence from the start to the end value.

Concept tested: Linux `seq` command usage

Source: https://linux.die.net/man/1/seq

Topics

#seq command#command-line utilities#sequence generation

Community Discussion

No community discussion yet for this question.

Full LFCS Practice