Example C Program Of FUNCTION CALL BY VALUE

 Program By-Jayant Purohit

#include<conio.h>
#include<stdio.h>
int my_fun(int,int);
void main()
{
int ch1,ch2,result;
clrscr();
printf("Please enter the first number :->");
scanf("%d",&ch1);
printf("Please enter the second number :->");
scanf("%d",&ch2);
result=my_fun(ch1,ch2);
printf("The result of the sum is :->%d",result);
getch();
}
int my_fun(int a,int b)
{
return(a+b);
}



2 comments:

Please write your Views about this Post here:->;

Pageviews last month