+2 votes
in Class 12 by kratos

What are actual and formal parameters of a function?

1 Answer

+2 votes
by kratos
 
Best answer

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();

}

...