functions1
//1.with arguments and return value
#include <stdio.h>
int sum(int a,int b); // function declaration
int main()
{
int a,b,c;
a=3;
b=5;
c=sum(a,b); //function calling
printf("%d",c);
return 0;
}
int sum(int a,int b) // function definition
{
return a+b;
}
Comments
Post a Comment