Question about Parameters, Arguments in C

Status
Not open for further replies.

E-design

Advanced Member level 5
Joined
Jun 1, 2002
Messages
2,014
Helped
507
Reputation
1,016
Reaction score
408
Trophy points
1,363
Activity points
14,193
The following confuses me

In programming C, I read that Arguments can/are also called Parameters, now

can we say that a Formal Parameter is also a Parameter? If so,

can a Formal Parameter also be called an Argument?

Reading various sources I get conflicting explanations.
 

Hi,
Formal Parameters are devied into 2 categories: call-by-value parameters, call-by-reference parameters. (Of course addition to formal parameters is actual parameters)
So, formal parameters are parameters.
 

So are they also Arguments?
 

If we take a function prototype:
void funct(int a, int b);
then a and b are the functions parameters.
If we call it:
funct(1, 2);
then 1 and 2 are the arguments to the function.
 

when we call function passing variable call arguments where recieving function body variables are parametre.
 

The data type of a parameter is to be the same as that of a corresponding parameter. If a non-address type is used, we usually call it call-by-value. If we use an address type, then, we call it call-by-reference.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…