<aside> <img src="/icons/home_green.svg" alt="/icons/home_green.svg" width="40px" />
</aside>
Functions and Modular Programming
https://jennychen9827.github.io/CAD281/function.html

// Example of a simple function
void printWelcome() {
printf("Welcome to Tic Tac Toe!\\n");
}
Each function in the example above has a specific purpose, making the code easier to understand and maintain.
| Component | Description | Example |
|---|---|---|
| Return Type | What the function returns | int, void, float, etc. |
| Function Name | Identifier for the function | calculateSum |
| Parameters | Input variables | (int a, float b) |
// Function Declaration Syntax
returnType functionName(parameterType1, parameterType2);
// Example
int calculateSum(int a, int b);
void displayMessage(char* text);
float getAverage(float numbers[], int size);