UPDATED ACTUAL Exam Questions and
CORRECT Answers
What should your stop statement do? - CORRECT ANSWER - Terminates the program
and return a code of 0.
Done via the stop 0 command
What is one way of checking if your program ran sucessfully? - CORRECT ANSWER -
using the echo $? on command line. See if it prints out the value next to your stop statement
What statement must all your programs have? - CORRECT ANSWER - implicit none
Your variable names should - CORRECT ANSWER - be very descriptive
What should be included in your declaration section for more clarity with user? - CORRECT
ANSWER - Variable dictionary that provides the name of the variable, and its units
What is critical when naming variables? - CORRECT ANSWER - Variables MUST have a
value assigned to them before they can be used in an expression
What errors occur when you fail to assign a value to a value and use it in an expression? -
CORRECT ANSWER - Execution-time error or run-time error
Say a program you want to write has a constant (g = 9.81 m/s^2), how would you use this in the
program? - CORRECT ANSWER - Make g a parameter that cannot change value. Done
via the statement
real, parameter :: G = 9.81
, Make your parameters uppercase to make them visually apparent
What are binary operators? - CORRECT ANSWER - They require two "operands" or two
inputs to work
+ (addition), - (subtraction), * (multiplication), / (division)
Unary Operators - CORRECT ANSWER - require only one operand. Includes only the +
and - operators to assign signs to numbers
Arithmetic Operator Rules - CORRECT ANSWER - 1) No two operators may occur
sequentially
2) Negative values cannot be exponentiated to a non-integer power or a negative power
3) Division by zero is not permissible
a*-b - CORRECT ANSWER - illegala
a*(-b) - CORRECT ANSWER - legal
a**-2 - CORRECT ANSWER - illegal
a**(-2) - CORRECT ANSWER - legal
(-1.0)**2 - CORRECT ANSWER - legal