Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

user define function in c


#include<stdio.h>

int add (int,int);
int mul(int);

main()

{
  
  int a=4,b=8,sum;
  sum= add (a,b);
  int m=mul(sum);
  printf("%d 
",sum);
 
  printf("%d
",m);
  
}
int add (int x,int y)

{
  
 int sum=x+y;
 
 
  return sum;
}

int mul(int x)

{
  
  int mul = x*x;
  return mul;
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #user #define #function
ADD COMMENT
Topic
Name
4+9 =