Fortran MCQ Multiple Choice Questions Answers - Page 2 | Quiz for Practice
Fortran MCQ Questions for Practice
16. In a FORTRAN program I have set x=1.5,i=3, and j=2. What is the value of y if:
Correct Answer is: 4.0
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
Correct Answer is: 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)
Correct Answer is: 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?
Correct Answer is: **
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)
Correct Answer is: 2-1-4-3
21. On the Hammond machines, a single precision floating point (REAL*4) number uses how many bits of memory?
Correct Answer is: 32
22. A number stored in Double Precision Floating Point (REAL*8) format can have at most approximately how many decimal digits of precision?
Correct Answer is: 15
23. A real number established with selected_real_kind(6,30) uses how many bits?
Correct Answer is: 32
24. What is the first number in the following list that can not be represented with a Fortran INTEGER*4 (the default setting on the Hammond machines) data type?
Correct Answer is: 2,000,000,000,000
25. What is the first number in the following list that can not be represented with a FORTRAN REAL*8 (Double Precision) variable?
Correct Answer is: 3.0*101000
26. Which of the following is an executable statement (takes an action when a.out is executed)?
Correct Answer is: ALLOCATE
27. Which of the following is an executable statement (takes action when a.out is executed)?
Correct Answer is: CLOSE
28. A FORTRAN WHERE statement:
Correct Answer is: Conditionally executes one or more Fortran 90 vector (array) statements