2-Functions Flashcards
A function
A group of statements that together perform a task
main ()
Every C program has at least this one function
A function decleration
Tells the compiler about a function’s name, return type, and parameters
A function definition
Provides the actual body of the function
Function Return Type
The data type of the value the function returns
Function Name
The actual name of the function
Parameter list
Refers to the type, order, and number of the parameters of a function
Function Body
Contains a collection of statements that define what the function does
int max(int num1, int num2);
Given the function declaration above, which parts of the function comprise the function signature? Select all that apply.
Function name max
parameter int num2
parameter int num1
To call a function, you simply need to pass the required parameters along with the function name
True
Regarding calling a function, arguments are used when _________ a function.
Calling
When calling a function, call by value refers to what behavior?
copies the actual value of an argument into the formal parameter of the function