Function Passing Arguments and Returning Value

Function Passing Arguments and Returning Value

This program describes that function passing arguments and returning value.

#include <stdio.h>
#include <conio.h>

int sum (int, int);

void main()
{
int a,b,c;
printf("enter two numbers :");
scanf("%d%d",&a,&b);
c = sum(a,b);
printf("n the sum of two numbers is : %d", c);
getch();
}
int sum(int s, int t){
int add;
add = s+t;
return (add);
}

Output

Function Passing Arguments and Returning Value