+ 1
What are actual and formal parameter??plz give an example
2 Respuestas
+ 3
actual parameter are the real value that its been sent to the function
while formal parameter are just place that we stored that value
+ 1
#include <iostream.h >
int sum (int,int);
int main ()
{
int a,b,c;
cout <<"enter two values";
cin>>a>>b;
c=sum (a,b);//actual argument
cout <<"sum"<<c;
return 0;
}
int sum(int x,int y)//formal arguments
{
int z;
z=x+y;
return (z);
}