main()
{
int a,b,c;
a=5;
b=8;
c=add(a,b)
printf(c);
}
int add(int y, int x)
{
int z=y+x;
return z;
}
here you have to declare add(int,int) first becoz you are defining it after the call has been made. otherwise simply put the definition before main likr:......
int add(int y, int x)
{
int z=y+x;
return z;
}
main()
{
int a,b,c;
a=5;
b=8;
c=add(a,b);
//printf("%d",c);
}