The number of tokens in the Fortran statement DO 10 I = 1.25 is:

1999

The number of tokens in the Fortran statement DO 10 I = 1.25 is:

  1. A.

    3

  2. B.

    4

  3. C.

    5

  4. D.

    None of the above

Attempted by 29 students.

Show answer & explanation

Correct answer: A

The correct answer is 3.

In old Fortran, blanks are insignificant in source statements. Therefore DO 10 I = 1.25 is read as DO10I = 1.25, which is an assignment statement, not a DO loop.

The tokens are:
1. DO10I
2. =
3. 1.25

Hence, the statement contains 3 tokens.

Explore the full course: Gate Guidance By Sanchit Sir