0% found this document useful (0 votes)
57 views6 pages

Fortran MCQ

The document contains a series of multiple-choice questions related to Fortran programming, covering topics such as syntax, variable declarations, data types, and operations. It includes questions on the properties of Fortran statements, memory usage, and the functionality of specific commands. The questions are designed to test knowledge of Fortran programming concepts and practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views6 pages

Fortran MCQ

The document contains a series of multiple-choice questions related to Fortran programming, covering topics such as syntax, variable declarations, data types, and operations. It includes questions on the properties of Fortran statements, memory usage, and the functionality of specific commands. The questions are designed to test knowledge of Fortran programming concepts and practices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

By InterviewMocks.

com
Fortran Online Test

Q1. A Fortran is not....

A. System supported
B. Programmer supported
C. Case Sensitive
D. Source supported

Q2. The delimiter in a FORTRAN code:

A. Colon
B. Comma
C. Blank space
D. Semicolon

Q3. A program that reads the source code and converts it to a form usable by the
computer:

A. Compiler
B. Assembler
C. Linker
D. Interpreter

Q4. A valid variable declaration in FORTRAN is....

A. Celsius real
B. real :: Celsius
C. real : Celsius
D. real Celsius

Q5. In FORTRAN, the declarations of variables can be modified using the


....parameter:

A. make
B. select
C. change
D. kind
Q6. 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. sqrt(x)
D. x*0.5

Q7. On the Hammond machines, a single percision floating point (REAL*4) number
uses how many bits of memory?

A. 8
B. 15
C. 32
D. 47

Q8. Language used to solve complex mathematical computations is termed as:

A. FORTRAN
B. Pascal
C. Ada
D. COBOL

Q9. 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-4-3
B. 2-1-4-3
C. 1-2-3-4
D. 2-1-3-4

Q10. Which of the following is invalid statement in FORTRAN:

A. DO 10001 = 1,5
B. Continue
C. P + Q +
D. Dimension X (30,20)

Q11. FORTRAN was developed by:

A. Google
B. IBM
C. Apple
D. Black berry

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

A. Integer parameters can be used to set array dimensions


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

Q13. 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?

A. 2,000,000,000,000
B. 1025
C. 2,000,000

Q14. A FORTRAN WHERE statement:

A. Returns the name of the current Subroutine or Function


B. Conditionally executes one or more Fortran 90 vector (array) statements
C. Provides the current cursor position on the terminal screen
D. Provides the current line number in the input file being processed

Q15. Which of the following statements is a valid way to open the file test.data and
associate it with unit 10?

A. open(10,’test.data’)
B. open(10,file=’test.data’)
C. open(10,test.data)
D. open(10, file= test.data )

Q16. 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. 16.0
C. 64.0
D. 12.0
Q17. The command ” man ls > more ” will:

A. Provide help on the command “ls” viewed with the utility “more”
B. Result in a system message: “Command not found”
C. Provide help on the command “ls” as text in a file called “more”
D. Provide help on commands alphabetically between ls and more

Q18. When using vi, which of the following commands will delete a full line?

A. dd
B. r
C. x
D. dl

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

A. +
B. /
C. *
D. **

Q20. not determined due to a Fortran Syntax error 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. not determined due to a FORTRAN syntax error
C. 14.0
D. 15.0

Q21. What is the purpose of a number in column 2 to 5 in Fortran 77 fixed format:

A. Just a jump label


B. Just a format label
C. A jump label or format label
D. None

Q22. How can we continue source code from one line to the next in Fortran 95?

A. An ampersand & at the end of a line


B. By using brackets
C. by an asterisk * in column 6
D. None of the above

Q23. What signals a comment in Fortran 95?

A. A C in column one
B. An exclamation mark ! anywhere on the line
C. An asterisk * in column six?
D. None of the above

Q24. What are the basic data types in Fortran?

A. INteger, Real, Complex, Character


B. Integer, Real, Double Precision, Character
C. Integer, Real, Character, Logical
D. none

Q25. Which of the following is an executable statement ( takes action when “a.out” is
executed)?

A. DIMENSION
B. CLOSE
C. EXTERNAL
D. INTRINSIC

Q26. What is the first number in the following list that can not be represented with a
FORTRAN REAL*8 ( Double Precision ) variable?

A. 3.0*101000
B. 3.0*10-80
C. 3.0*10100
D. 3.0*1050

Q27. Which of the following is an invalid DO statement in FORTRAN ?

A. DO 88 L = 3, K, 2
B. DO 77 NX= 1,27
C. DO 71 X = 1, 10, 2
D. DO 50 IPQ = 3, 27,2.

Q28. The FORTRAN statement DO 400, K = X, J, 18 is incorrect. It should be

A. DO, 400 K = X,J, 18


B. DO 400 K = X, J, 13.
C. DO 400 K = (X), J, 18
D. DO 400 K = I X, J, 18

Q29. The FORTRAN expression E.1E6 is recognized as

A. 5.1 x 106
B. 0.51 x 106
C. 5 x 106.
D. 51 x 106

Q30. The number of elements in array x, y in the statement DIMENSION x (.150),


>(4,8) are respectively

A. 50 and 16
B. 50 and 64
C. 50 and 80.
D. 50 and 32

Please Visit interviewmocks.com to download more pdfs

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy