Category:C: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) m (→Curly Braces) |
Puppydrum64 (talk | contribs) m (→Functions) |
||
Line 69:
//procedure whose outcome does not need to be measured or remembered later.</lang>
Note that the variable names listed as arguments when declaring a function are
<lang C>int foo(int x){
return x;
} // "x" doesn't need to be a variable in your real program. If it is, that's not related in any way to the "x" here.
int main()
Line 80:
int z = 2;
y = foo(z); //note that x was never involved. That's because the "x" earlier was
}</lang>
|