Science, asked by ghhg1016, 1 year ago

What is actual parameter and formal parameter in c language with example?

Answers

Answered by Jaikrishnan
0
these can be found only in program with function

in the function call the variables used is called actual parameters. These variables are in the main function .

In the function definition the variables used are called formal parameters they receive the value of the called variable and stores it in it.




eg:
#include <upstream.h>

void sum( int , int )
void main()
{
int x, y;
cout<< "ENTER TWO NO."
cin>>x>>y;

sum(x,y)
}

void sum( int a , int b)
{
cout<<(a+b);
}




HERE
x and y are actual parameters
AND
a and b are formal parameters
Similar questions