Category:C: Difference between revisions
m
→Functions
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) m (→Functions) |
||
Line 42:
===Functions===
A function is made up of three parts: its return value, its name, and its arguments.
<lang C>int main(void)
int sum(int a,int b)
Note that the variable names listed as arguments when declaring a function are just for convenience. They need not be declared nor defined, nor do they refer to any variables in your program that happen to have the same name. It's only when a function is actually <i>used</i> are the argument variables required to exist.
<lang C>int foo(int x){
|