Software and Applications (non-game)
Computer Programming
C Programming
The Difference Between

What is the difference between actual and formal arguments used in functions in C language?

545556

Answer

User Avatar
Wiki User
01/25/2009

The arguments passed to the functions while the function is called is known as the actual arguments, whereas the arguments declared in the function header is called as formal arguments.

Ex. Suppose sum() is a function.

int sum(int x, int y) /*Here x and y are called formal arguments*/

{...}

void main()

{

int ans;

....

ans = sum(3,5); /*Here the arguments 3 and 5 are called actual arguments*/

...

getch();

}