what is the difference between the formal arguments and the actual arguments used in c language?
what is the difference between the formal arguments and the actual arguments used in c language?
Top 2 Answers
Favorite Answer
The formal arguments are the names given to the parameters/arguments in the function declaration. These names will be used within the body of the function.
void myFunc( int i, char c ); // Function prototype
The actual arguments are the variables and/or constants (those supplied by the caller) that are used when invoking the function.
int intVar = 6;
char charVar = ‘e’;
// Actual parameters 3 and ‘G’ will be mapped to the
// formal parameters ‘i’ and ‘c’
myFunc( 3, ‘G’ ); // Execute function
// Actual parameters ‘intVar’ and ‘charVar’ will be mapped
// to the formal parameters ‘i’ and ‘c’
myFunc( intVar, charVar ); // Execute function
0
5 years ago
… Basically an actual argument is not containable in terms of any framework such as time schedule or venue. It requires no conclusion whatsoever. It has it’s own pros and coin. However a formal argument is meant to conclude in predefined framework with a reconciled result. …
0