program to use sum of two numbers is functions in C language
इस program मैं दो value को जोड़ रहा है
#include<stdio.h>
int sum(int x,int y); /*Function declaration*/
int main()
{
int a,b,s;
printf("Enter values for a and b : ");
scanf("%d%d",&a,&b);
s=sum(a,b); /*Function call*/
printf("sum of %d and %d is %d\n",a,b,s);
return 0;
}
int sum(int x,int y) /*Function definition*/
{
int s;
s = x+y;
return s;
}
output
Enter values for a and b : 12
6
sum of 12 and 6 is 18