Latest Questions
Post Top Ad
Your Ad Spot
Monday, June 24, 2019

10 Top Fortran Interview Questions and Answers {Updated}

Fortran Interview Questions and Answers for experienced PDF, Read commonly asked Fortran Job Interview Questions with Answers PDF for Freshers.

Read Fortran Interview Questions and Answers

What is FORTRAN? What is the structure of the main program?
Fortran is referred to as a third-generation programming language, built for numeric computation and scientific computing.
The main structure of the program
• Program name
• Declarations
• Statements
• Stop end

What makes Fortran a suitable language for scientific purpose?
• Built-in support for arguments in subroutines
• Available built-in support for complex numbers
• Rich set of intrinsic functions
• Support for array notation enabling operations on array sections
• For memory pointers, strong aliasing rules, resulting in more efficient code after compilation

How recursion is used in Fortran?
When one function calls to another function or itself, in a defined area of call is called recursion.
• It is denoted as a subroutine as well, and it has the scope of the stack that directly supports the subroutines
• The return location on the stack that uses the subroutine is fixed and is adjacent to the subroutine code
• To call a function within a function recursion is used, and it allows easy calling of the function and minimizes writing of the code

What are the rules involved in debugging?
For debugging the rules involved are
• Code modification is not done until not sure about the bug by checking all the conditions and criteria
• Modular program is being used which defines the task, and it is placed in the debug statements that can ISOLATE some of the functioning of the code
• Combinations of inputs are carried out to get the desired output if strange results are noticed
• Use the tools provided with the debugger

What does a DATA statement do?
DATA statements assign a specific value into a Fortran variable before the execution of the program. It takes the following form.
• DATA var-list /c-list/[[ ,] var-list/c-list/]

What is the difference between a Subroutine and function Subprogram?
• The main difference is a subroutine never returns a value that is associated with its name. Which means that you never have to state a subroutine name in a type statement (Real, Integer…). All the information coming back from a subroutine passes through the argument list.
• Another difference is that a sub-routine need not have an argument list

What is a logical variable? What does it store there?
Logical variables are used along with IF statements. When you want to set a logical variable to false, you use “LVAR=FALSE” and when you want to set as true, you use “LVAR=TRUE.” For false, the computer usually stores an integer 0 in memory and, for true it stores as integer 1.

What are the methods by which we can correct the syntax errors?
• To check the error during runtime or compile time of the program, the compiler is used.
• It flags the error so that it can be corrected at a later stage, also it makes an error easier to understand
• With the help of inbuilt functions, errors can be reduced, and usage of the functions can be maximized
• To correct the listed errors and compile it again to recheck the errors windowing terminal is used
• The compiler can create a LIST FILE that places the list of the file in the EDITING BUFFER and enables users to correct errors by placing the program into another location.

What is the use of appending underscore suffix?
• The compiler of the Fortran keeps on appending a trailer underscore with the routine names
• Underscore suffix prevents the two names that are associated with the user-written routines from clashing
• It also prevents the routines associated with the system libraries to interact with each other

Post Top Ad

Your Ad Spot