Arguments v.s. Parameters

What is the difference between arguments and parameters when it comes to functions? May I please have an explanation and an example, thanks.
Semantics. Most literature will say something like passing arguments to an application.

Hence int main (int ArgC, char *ArgS []).

Then you've probably read allot about function parameters, but in essence, it is exactly the same thing.

int MyFunction (int Value, char **CmdStrings)

In essence both these pass exactly same sort of information to main & MyFunctions, but with different names.

Most programming documentation today will refer to this as passing values or pointers to values to a function or subroutine. There is a another tidbit, functions are considered routines that return a value to caller and subroutines don't.

Terminology evolves with the industry and most often what sticks is just simply that which be most commonly used.
How I use them is:

I pass arguments to a function.
f(i, j); //i and j are arguments

I use the parameters inside the function.
1
2
3
void f(int i, int j) {
   //i and j are parameters here
}


I wouldn't care that much if you switched them though honestly...and I probably switch them occasionally too.
I do as firedraco.
Last edited on
Same as firedraco, where formal parameters are in the signature of the definition and arguments are the values/variables passed in when it is called.
Topic archived. No new replies allowed.