Which of the following terms is appropriate to describe the process by which FunctionA causes FunctionB to execute?
FunctionA activates FunctionB
FunctionA calls FunctionB
FunctionA starts FunctionB
FunctionA launches FunctionB
Which of the following terms are synonomous?
Call and Invoke
Pass and Return
Invoke and Pass
Call and Return
"Passing" information implies information flow
from main() to the operating system.
from the user to the program.
from the called function to the calling function.
from an invoking function to the invoked function.
The values passed to a function are called
operands.
arguments.
parameters.
expressions.
The variables that a function uses to catch information from a calling function are called
operands.
arguments.
parameters.
expressions.
The header of a function contains all of the following information except
the type of the return value.
the name of the function.
the list of parameters and their types.
the statements that define how the function behaves.
The body of a function contains what information
the type of the return value.
the name of the function.
the list of parameters and their types.
the statements that define how the function behaves.
What is meant by the "type" of a function?
The data type of the first argument.
The data type of the return value.
Two possible types - pass-by-value and pass-by-reference.
Whether the function requires a fixed number of arguments or can accept a variable number of arguments.
What is the purpose of a function prototype?
To permit the compiler to perform type checking on all parameters.
To document the list of arguments to all functions in a convenient place.
To give the compiler enough information to enable it to compile calls to the function.
To give the compiler the information necessary to compile the function.
How is information passed back to the calling function?
Through the use of a "return()" statement.
By setting the name of the function equal to the value to be passed back.
The value of the last expression in the function is the value passed back.
Through the use of an "exit()" statement.
What is meant by saying that a particular function is a "void function".
The function has a "void" argument list and therefore takes no arguments.
The function failed to compile and is therefore invalid.
Only the function prototype has been seen and therefore the body of the function is considered "void".
The type of the function is "void" meaning that it returns no value to the calling function.
How does the compiler distinguish between a function prototype and a function definition?
A function prototype is followed by the opening brace of the function body whereas a function definition is terminated by a semicolon.
A function definition is followed by the opening brace of the function body whereas a function prototype is terminated by a semicolon.
A function prototype is not required to have parameter names whereas a function definition must have them.
A function prototype appears above main() whereas a function definition appears below main().
How do the elements of a function prototype differ from that of a function definition?
A function prototype is followed by the opening brace of the function body whereas a function definition is terminated by a semicolon.
A function definition is followed by the opening brace of the function body whereas a function prototype is terminated by a semicolon.
A function prototype is not required to have parameter names whereas a function definition must have them.
A function prototype appears above main() whereas a function definition appears below main().
What is meant by "call by value"?
A copy of the argument's value is stored in the temporary memory location allocated to the matching function parameter.
The address of the variable is passed to the function permitting the function to directly access and alter the value of the variable.
Instead of calling a named function, the function to be called is identified by its unique "function value".
The information returned by the function is a value as opposed to a memory location.
If a variable having the same name as a global variable is declared within a function, then within that function which variable does that name refer to?
The global variable.
The local variable.
This is implementation dependent and the primary reason why such a practice should be avoided.