Fortran MCQ Questions and Answers Quiz

11. The command man ls > more will:

  1. Provide help on the command ls as text in a file called more
  2. Provide help on the command ls viewed with the utility more
  3. Provide help on commands alphabetically between ls and more
  4. Provide a more detailed help on the command ls than is usually given

12. Which of the following is not a valid property of a PARAMETER statement?

  1. Can combine other parameters with FORTRAN arithmetic operators to compute the value of a new paramete
  2. Parameters can be set anywhere in a program
  3. Integer parameters can be used to set array dimensions
  4. Parameters can be used as bounds on do loops

13. For the following FORTRAN operations give the rank from fastest to slowest in terms of computer time required

  1. x*0.5
  2. x+0.5
  3. x**0.5
  4. sqrt(x)

14. In a FORTRAN program I have set x=2.0, a=2.0 and b=4.0. What is the value of y if: y = a*x+b**2/x ?

  1. 8.0
  2. 12.0
  3. 16.0
  4. 64.0

15. In a FORTRAN program I have set x=1.5,i=3, and j=2. What is the value of y if:

  1. 3.0
  2. 3.5
  3. 4.0
  4. 4.5

16. In a FORTRAN program I have set x=1.5,i=3, and j=2. What is the value of y if:

  1. 3.0
  2. 3.5
  3. 4.0
  4. 4.5

17. In a FORTRAN program x=4.5, y=3.0, and w=1.5, What is the value of z if: z = x+w/y+1

  1. 1.5
  2. 3.0
  3. 4.5
  4. 6.0

18. In a FORTRAN program x=1.0, y=2.0 and w=3.0. What is the value of z if: z=2.0(x(y+3.0)+w)

  1. 12.0
  2. 16.0
  3. 18.0
  4. not determined due to a FORTRAN syntax error

19. After compiling the FORTRAN statement: y = c/d + a*x**2-5 Which operation is performed first by the computer?

  1. /
  2. +
  3. *
  4. **

20. For the following FORTRAN operations give the rank from fastest to slowest in terms of computer time required: 1) x*0.5 2) x+0.5 3) x**0.5 4) sqrt(x)

  1. 1-2-3-4
  2. 1-2-4-3
  3. 2-1-3-4
  4. 2-1-4-3
Tags

MCQ Multiple Choice Questions and Answers on Fortran

Fortran Question and Answer