I think some mentioned above are just synonyms but which ones? Also correct me if I'm wrong: In a function lets say the main function, the data between parenthesis is parameters/arguments?
2 Answers
Passing values to a function has two points of view:
A function itself has a parameter (or formal parameter), when it is compiled. I. e. …
void f( int a )
{
…
}
… has the (formal) parameter a
.
When the function is called at run-time, there is a value that a
represents. This is the argument (actual parameter):
f( 5 )
Here 5
is the argument (actual parameter).
So the call maps the argument/actual parameter to the formal parameter.
In C in some situations you can pass a variable number of arguments to a function. This is, if the function has an open parameter list:
f( int a, ... )
In many cases the first parameter is a format string that needs additional arguments. I. e.:
printf( "%d items", 5 );
In this case "%d items"
is a format string (format argument) that tells the function to insert a string representation of the second argument ahead of " items"
.
But a variable number of arguments does not limit to format strings. I. e. the following examples are all (formally) valid calls:
f( int a, ... ) { … }
f( 5 );
f( 6, 2, 3 )
I think, dummy arguments/parameters has different meanings. It can be an parameter (and therefore an argument in a call) that isn't used inside the function. It can be an optional parameter, that gets a default value, if there is no argument for it in the call. (This concept does not exist in C, but in other programming languages.)

- 16,582
- 3
- 35
- 50
-
With `void f( int a )` and `f(5.3)`, what might you call the 5.3 given to the function versus 5 that was passed to `f()`? – chux - Reinstate Monica Apr 20 '18 at 12:00
-
This is out of scope of the Q. However, it might be a help for you to read section 3.3 and 6.5.2.2 of the standard. – Amin Negm-Awad Apr 20 '18 at 16:47
A parameter is defined in the function definition.It is a placeholder for the arguments during function execution.
void printMessage(string message){ //message is a parameter.
}
An argument is a value passed to a function when the function is called.
printMessage("Hello World"); //"Hello World" is an argument.
Though someone consider argument as a parameter.

- 1,160
- 1
- 13
- 33
-
To be more precise, a pointer to `"Hello WOrld"` is the actual argument, not `msg.` The latter one would be a call by reference that does not exist in C. – Amin Negm-Awad Apr 20 '18 at 04:11
-