Bifalgorithm post · Computer science one · Calling Functions
How do you call a function in C?
How do you call a function in C? (Computer science one · Calling Functions) — "18.1.4. Calling Functions Once a function has been defined, or at least a protot…
Ideas in this flowchart
- Calling functions after they are defined or declared
- The function must be defined before it is called
- A prototype can instead be brought into scope with an #include statement
- Invoke a function by writing its name followed by parentheses
- The parentheses contain values or variables passed to the function
- Examples of function calls
- Calling sum(a, b) with a = 10 and b = 20 produces c = 30
- Calling getDistance with literal coordinates produces a distance value
- A combination example begins with the value p = 1500.0