Lesson 14 of 23
Functions
10 min 25 XP
A function is a named block of code with a return type, a name and parameters. If you define it below main(), declare a prototype above main().
Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.C passes arguments by value: changing a parameter inside a function doesn't change the caller's variable. To change it you need pointers (next module).
Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.