Top 33 Fortran Objective type Questions and Answers

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

A. Can combine other parameters with FORTRAN arithmetic operators to compute the value of a new parameter
B. Parameters can be set anywhere in a program
C. Integer parameters can be used to set array dimensions
D. Parameters can be used as bounds on do loops.
Ans: B

2. For the following FORTRAN operations give the rank from fastest to slowest in terms of computer time required
A. x*0.5
B. x+0.5
C. x**0.5
D. sqrt(x)
Ans: C

3. Which of the following is not a valid property of a PARAMETER statement?
A. Can combine other parameters with FORTRAN arithmetic operators to compute the value of a new parameter
B. Parameters can be set anywhere in a program
C. Integer parameters can be used to set array dimensions
D. Parameters can be used as bounds on do loops.
Ans: B

4. 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 ?
A. 8.0
B. 12.0
C. 16.0
D. 64.0
Ans: B

5. In a FORTRAN program I have set x=1.5,i=3, and j=2. What is the value of y if:
A. 3.0
B. 3.5
C. 4.0
D. 4.5
Ans: C

6. 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
A. 1.5
B. 3.0
C. 4.5
D. 6.0
Ans: D

7. 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)
A. 12.0
B. 16.0
C. 18.0
D. not determined due to a FORTRAN syntax error
Ans: D

8. After compiling the FORTRAN statement: y = c/d + a*x**2-5 Which operation is performed first by the computer?
A. /
B. +
C. *
D. **
Ans: D

9. 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)
A. 1-2-3-4
B. 1-2-4-3
C. 2-1-3-4
D. 2-1-4-3
Ans: D

10. On the Hammond machines, a single percision floating point (REAL*4) number uses how many bits of memory?
A. 4
B. 7
C. 15
D. 32
Ans: D