26.15: Quiz Question Answers - Chapter 15
- Page ID
- 54433
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
Quiz question answers for chapter 15 are as follows:
- The two types of Fortran subprograms are subroutines and functions.
- A function returns a single value.
- The variables in the call are referred to as actual arguments.
- The variables in the function heading are referred to formal arguments.
- The return type is integer.
- Yes, it possible to pass integer arguments to a real function.
- The keyword
contains
. - The answers are as follows:
- 8.
- 9.
- The answers are as follows:
- fahrToCelsius.
- Yes.
- No.
- 10.0.
- The term variable scope refers to where a given variable can be accessed.
- The answers are as follows:
in
out
inout
- The term side-effect is when a function changes one or more of its input arguments. In general, this is considered poor practice and should be avoided.