Frequently asked questions and answers of Fortran in Programming Technologies of Computer Science to enhance your skills, knowledge on the selected topic. We have compiled the best Fortran Interview question and answer, trivia quiz, mcq questions, viva question, quizzes to prepare. Download Fortran FAQs in PDF form online for academic course, jobs preparations and for certification exams .
Intervew Quizz is an online portal with frequently asked interview, viva and trivia questions and answers on various subjects, topics of kids, school, engineering students, medical aspirants, business management academics and software professionals.
Applying to a makeup school as an international student can be an exciting and transformative journey, yet it also comes with its own set of challenges and requirements. As the beauty industry continues to expand on a global scale, makeup school application requirements for international students are becoming more and more popular day by day. Discover the importance of aligning your career goals with the right program and institution, ensuring that your educational experience is both enriching and conducive to future career path.
Question-1. What does Fortran stand for?
Answer-1: Fortran stands for FORmula TRANslation.
Question-2. What is Fortran mainly used for?
Answer-2: Fortran is used for scientific computing, numerical methods, and high-performance computing.
Question-3. When was Fortran first developed?
Answer-3: Fortran was first developed in the 1950s by IBM.
Question-4. What are the major versions of Fortran?
Answer-4: Major versions include Fortran 66, Fortran 77, Fortran 90, Fortran 95, Fortran 2003, Fortran 2008, and Fortran 2018.
Question-5. What is a Fortran program structure?
Answer-5: A Fortran program has a structure that includes Program, Declarations, Executable Statements, and End.
Question-6. What is a Fortran module?
Answer-6: A module is a container for related procedures, functions, and data definitions.
Question-7. What is the purpose of the IMPLICIT NONE statement in Fortran?
Answer-7: It disables implicit typing, requiring explicit declaration of all variables.
Question-8. How are comments written in Fortran?
Answer-8: Comments begin with a ! symbol.
Question-9. What is the difference between Fortran 77 and Fortran 90?
Answer-9: Fortran 90 introduced modern features like modules, array operations, and recursion.
Question-10. What are Fortran intrinsic functions?
Answer-10: Built-in functions such as SIN, COS, SQRT, and SUM.
Question-11. What is the syntax for declaring a variable in Fortran?
Answer-11: Use type declarations like INTEGER :: x, REAL :: y.
Question-12. What is an array in Fortran?
Answer-12: An array is a collection of elements of the same type, declared using dimensions.
Question-13. How do you declare a 2D array in Fortran?
Answer-13: Example: REAL, DIMENSION(3,3) :: matrix.
Question-14. What is the DO loop in Fortran?
Answer-14: A loop structure used for iteration. Example: DO i = 1, 10.
Question-15. What is an END DO statement in Fortran?
Answer-15: It marks the end of a DO loop.
Question-16. What is the IF statement in Fortran?
Answer-16: It is used for conditional execution. Example: IF (x > 0) THEN.
Question-17. How do you write an IF-ELSE construct in Fortran?
Answer-17: Use IF followed by ELSE IF and ELSE statements.
Question-18. What is the difference between FUNCTION and SUBROUTINE in Fortran?
Answer-18: A FUNCTION returns a value, while a SUBROUTINE performs an action but does not return a value.
Question-19. What is a derived type in Fortran?
Answer-19: A user-defined data type created using the TYPE keyword.
Question-20. How is a file opened in Fortran?
Answer-20: Use the OPEN statement, e.g., OPEN(UNIT=10, FILE='data.txt').
Question-21. How do you read data from a file in Fortran?
Answer-21: Use the READ statement, e.g., READ(10, *) var.
Question-22. How do you write data to a file in Fortran?
Answer-22: Use the WRITE statement, e.g., WRITE(10, *) var.
Question-23. What is the purpose of the CLOSE statement in Fortran?
Answer-23: It closes an open file.
Question-24. What is the FORMAT statement in Fortran?
Answer-24: It specifies the layout of input or output. Example: FORMAT('I5').
Question-25. What are Fortran data types?
Answer-25: Common types are INTEGER, REAL, DOUBLE PRECISION, LOGICAL, and CHARACTER.
Question-26. What is the difference between REAL and DOUBLE PRECISION in Fortran?
Answer-26: DOUBLE PRECISION has higher accuracy and uses more storage than REAL.
Question-27. What is dynamic memory allocation in Fortran?
Answer-27: It allows variables or arrays to be allocated at runtime using ALLOCATE.
Question-28. How is memory deallocated in Fortran?
Answer-28: Use the DEALLOCATE statement.
Question-29. What is a pointer in Fortran?
Answer-29: A pointer is a variable that stores the address of a target variable or array.
Question-30. What is the ALLOCATABLE attribute in Fortran?
Answer-30: It declares arrays whose size is determined at runtime.
Question-31. How do you define a subroutine in Fortran?
Answer-31: Use SUBROUTINE and END SUBROUTINE. Example: SUBROUTINE add(x, y, z).
Question-32. How do you call a subroutine in Fortran?
Answer-32: Use the CALL statement, e.g., CALL add(x, y, z).
Question-33. What are modules used for in Fortran?
Answer-33: Modules store procedures, functions, and variables for reuse.
Question-34. What is the USE statement in Fortran?
Answer-34: It imports a module into a program or subprogram.
Question-35. What is recursion in Fortran?
Answer-35: A function that calls itself directly or indirectly.
Question-36. How do you define a recursive function in Fortran?
Answer-36: Use the RECURSIVE keyword in the function definition.
Question-37. What is a parallel loop in Fortran?
Answer-37: It is a loop executed in parallel using OpenMP or other parallel computing techniques.
Question-38. What is the purpose of COMMON blocks in Fortran?
Answer-38: They allow sharing of variables between program units.
Question-39. How is complex arithmetic handled in Fortran?
Answer-39: Use the COMPLEX data type for complex numbers.
Question-40. What is the PARAMETER statement in Fortran?
Answer-40: It defines constants. Example: INTEGER, PARAMETER :: pi = 3.
Question-41. What are INTENT attributes in Fortran?
Answer-41: They specify how arguments are passed to subprograms, e.g., INTENT(IN) or INTENT(OUT).
Question-42. What is the SELECT CASE statement in Fortran?
Answer-42: It is used for multi-way branching based on a variable's value.
Question-43. What is an implicit variable declaration in Fortran?
Answer-43: Variables are automatically typed based on their names unless IMPLICIT NONE is used.
Question-44. How do you declare a constant in Fortran?
Answer-44: Use PARAMETER, e.g., REAL, PARAMETER :: pi = 3.14159.
Question-45. How are strings handled in Fortran?
Answer-45: Strings are declared using the CHARACTER type.
Question-46. What is the purpose of SAVE in Fortran?
Answer-46: It retains the value of a variable across multiple subroutine or function calls.
Question-47. What is an interface block in Fortran?
Answer-47: It declares the interface of an external procedure to ensure type-checking.
Question-48. How does Fortran handle multi-threading?
Answer-48: Using OpenMP or MPI for parallel programming.
Question-49. What is the purpose of STOP in Fortran?
Answer-49: It terminates program execution.
Question-50. What are the advantages of Fortran in scientific computing?
Answer-50: It offers efficient array handling, numerical precision, and extensive scientific libraries.
Frequently Asked Question and Answer on Fortran
Fortran Interview Questions and Answers in PDF form Online
Fortran Questions with Answers
Fortran Trivia MCQ Quiz