Functions and Modular Programming

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts from the lecture on functions and modular programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Modular Programming

Breaking a program up into smaller, manageable functions or modules.

2
New cards

Function

A collection of statements to perform a task.

3
New cards

Function Call

A statement that causes a function to execute.

4
New cards

Function Definition

Statements that make up a function, including its return type, name, parameter list, and body.

5
New cards

Return Type

The data type of the value that a function returns.

6
New cards

Void Function

A function that does not return a value.

7
New cards

Parameters

Variables containing values passed to a function.

8
New cards

Arguments

Values passed into a function at the time of the call.

9
New cards

Local Variables

Variables defined inside a function that are not accessible outside of it.

10
New cards

Global Variables

Variables defined outside of all functions, accessible to all functions defined after their declaration.

11
New cards

Static Local Variables

Variables that retain their contents between function calls.

12
New cards

Default Arguments

Arguments that are passed automatically to a parameter if the argument is missing on the function call.

13
New cards

Function Prototypes

Declarations that notify the compiler about a function before a call.

14
New cards

Passing by Value

When an argument is passed to a function, its value is copied into the parameter.

15
New cards

Passing by Reference

Using a reference variable to allow a function to modify values stored in the calling environment.

16
New cards

Function Overloading

Having multiple functions with the same name but different parameter lists.

17
New cards

The exit() Function

Terminates the execution of a program and can indicate the status of program termination.

18
New cards

Stubs

Dummy functions used in place of actual functions for testing.

19
New cards

Drivers

Functions that test other functions by calling them with various arguments.