Top 30 Fortran Multiple Choice Questions (MCQs) with Answers

Fortran, one of the oldest high-level programming languages, remains a cornerstone for scientific and engineering computations. Whether you’re preparing for competitive exams, coding interviews, or brushing up on your Fortran skills, these 30 Fortran MCQ questions with answers will help you test and improve your knowledge. Covering topics like data types, control structures, arrays, and subroutines, this quiz is designed for beginners and advanced learners alike.


Why Practice Fortran MCQs?

  • Exam Preparation: Ideal for students and professionals targeting technical exams or certifications.
  • Interview Readiness: Frequently asked Fortran questions in coding interviews.
  • Skill Enhancement: Reinforce your understanding of Fortran’s syntax and concepts.
  • Career Growth: Fortran is widely used in scientific computing, making it a valuable skill.

Fortran MCQ Questions and Answers

1. Which is an interpreted language?

a) C++
b) C
c) MATLAB
d) Fortran

2. In a compiled language, the translation to machine language is performed incrementally at run-time.

a) True
b) False

3. The first widely-used high-level language developed in 1957 is:

a) C
b) Java
c) Fortran
d) Cobol

4. FORTRAN stands for:

a) Function Operation Routine Translation
b) Formula Translation
c) Formula Operation Translation
d) Function Operation Translator

5. The first statement in a Fortran code is:

a) Include statement
b) Import statement
c) Program statement
d) @data statement

6. Fortran was first developed in:

a) 1950
b) 1957
c) 1960
d) 1945

7. Who developed Fortran?

a) Dennis Ritchie
b) John Backus
c) Bill Gates
d) Steve Jobs

8. A valid variable declaration in Fortran is:

a) Real :: Celsius
b) Real Celsius;
c) Celsius Real;
d) Real : Celsius

9. The declarations of variables can be modified using the kind parameter in Fortran.

a) True
b) False

10. Blank space is the delimiter in a Fortran code.

a) True
b) False

11. Fortran is primarily used for:

a) Web development
b) Scientific and engineering computations
c) Artificial intelligence and machine learning
d) Mobile app development

12. Fortran is widely used in:

a) Web development
b) Game development
c) Scientific and engineering applications
d) Social media and entertainment

13. Which statement is used to declare a variable in Fortran?

a) DIM
b) VAR
c) REAL
d) DEFINE

14. Which statement is used to assign a value to a variable in Fortran?

a) ASSIGN
b) VALUE
c) STORE
d) LET

15. Which statement generates a random number in Fortran?

a) RAND
b) RANDOM
c) RND
d) RNG

16. Which is not a valid property of a PARAMETER statement?

a) Can combine other parameters with Fortran arithmetic operators
b) Parameters can be set anywhere in a program
c) Integer parameters can set array dimensions
d) Parameters can be used as bounds on do loops

17. A number stored in Double Precision Floating Point (REAL*8) format has approximately how many decimal digits of precision?

a) 3
b) 7
c) 31
d) 15

18. A real number established with “selected_real_kind(6,30)” uses how many bits?

a) 4
b) 6
c) 30
d) 32

19. Which number cannot be represented with a Fortran INTEGER*4 (default) data type?

a) 0
b) 1025
c) 2,000,000
d) 2,000,000,000,000

20. On Hammond machines, a single precision floating point (REAL*4) number uses how many bits?

a) 4
b) 7
c) 15
d) 32

21. Which number cannot be represented with a Fortran REAL*8 (Double Precision) variable?

a) 1.0E-300
b) 1.0E100
c) 1.0E-100
d) 1.0E300

22. If x=4.5, y=3.0, and w=1.5, what is the value of z in: z = x+w/y+1?

a) 1.5
b) 3.0
c) 4.5
d) 6.0

23. If x=1.0, y=2.0, and w=3.0, what is the value of z in: z=2.0(x(y+3.0)+w)?

a) 14.0
b) 15.0
c) 16.0
d) 17.0

24. Rank the following Fortran operations 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

25. Identify a fourth-generation language (4GL):

a) Fortran
b) COBOL
c) Unix shell
d) C++

26. Java packages and Fortran subroutines are examples of:

a) Functions
b) Modules
c) Classes
d) Sub procedures

27. Which is standardized as IEEE 1364?

a) C
b) C++
c) Fortran
d) Verilog

28. What is contained in the NumPy library (relevant to Fortran integration)?

a) n-dimensional array object
b) Tools for integrating C/C++ and Fortran code
c) Fourier transform
d) All of the mentioned

29. Fortran supports which programming paradigms?

a) Structured programming
b) Array programming
c) Modular programming
d) All of the mentioned

30. An identifier in Fortran cannot be longer than how many characters?

a) 6
b) 31
c) 63
d) 128


Answer Key

  1. c) MATLAB
  2. b) False
  3. c) Fortran
  4. b) Formula Translation
  5. c) Program statement
  6. b) 1957
  7. b) John Backus
  8. a) Real :: Celsius
  9. a) True
  10. a) True
  11. b) Scientific and engineering computations
  12. c) Scientific and engineering applications
  13. c) REAL
  14. d) LET
  15. b) RANDOM
  16. b) Parameters can be set anywhere in a program
  17. d) 15
  18. d) 32
  19. d) 2,000,000,000,000
  20. d) 32
  21. d) 1.0E300
  22. d) 6.0
  23. a) 14.0
  24. d) 2-1-4-3
  25. c) Unix shell
  26. b) Modules
  27. d) Verilog
  28. d) All of the mentioned
  29. d) All of the mentioned
  30. b) 31

Tips to Use This Fortran MCQ Quiz Effectively

  1. Practice Regularly: Solve these questions multiple times to reinforce concepts like variable declarations, precision, and control structures.
  2. Understand Explanations: Review the answer key and understand why each option is correct or incorrect.
  3. Explore More: Check out additional resources on Fortran programming, such as Fortran Official Documentation or NumPy for Fortran integration.
  4. Join Communities: Engage with forums like Stack Overflow or X posts tagged with #Fortran for real-time discussions.