1/18
Flashcards covering key concepts from the lecture on functions and modular programming.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Modular Programming
Breaking a program up into smaller, manageable functions or modules.
Function
A collection of statements to perform a task.
Function Call
A statement that causes a function to execute.
Function Definition
Statements that make up a function, including its return type, name, parameter list, and body.
Return Type
The data type of the value that a function returns.
Void Function
A function that does not return a value.
Parameters
Variables containing values passed to a function.
Arguments
Values passed into a function at the time of the call.
Local Variables
Variables defined inside a function that are not accessible outside of it.
Global Variables
Variables defined outside of all functions, accessible to all functions defined after their declaration.
Static Local Variables
Variables that retain their contents between function calls.
Default Arguments
Arguments that are passed automatically to a parameter if the argument is missing on the function call.
Function Prototypes
Declarations that notify the compiler about a function before a call.
Passing by Value
When an argument is passed to a function, its value is copied into the parameter.
Passing by Reference
Using a reference variable to allow a function to modify values stored in the calling environment.
Function Overloading
Having multiple functions with the same name but different parameter lists.
The exit() Function
Terminates the execution of a program and can indicate the status of program termination.
Stubs
Dummy functions used in place of actual functions for testing.
Drivers
Functions that test other functions by calling them with various arguments.