- Actual argument/Actual Parameter are those argument whose value are transferred to the function at the time of its calling and actual argument may be constant,variable or an expression.
- Formal Argument /Formal Parameter are those argument which receives the value of actual argument.
- The data type,order,counting of actual and formal argument should match existingly.
img credit: Google images |
Example-:
#include<stdio.h>
#include<conio.h>
int sum_value(int,int)
main()
{int a=0,b=0,s=0;
printf("Enter The Value Of a And b \n ");
scanf("%d %d",&a,&b);
s=sum_value(a,b); /* Actual Argument */
printf("%d sum=%d",s);
getch();
}
int sum_value(int a,int b) /* Formal Argument */
{s=0;
s=a+b;
return s;
}
Output-:
Enter The Value Of a And b 10
5
sum=15
I Hope Techprogramiz Is Giving You Best Notes Of C
ReplyDelete