C Program Example for Call By Reference

int main()
{
int a=40,b=60,c;
c=add(&a,&b);
printf(“The Sum is: %d”,c);
return 0;
}
add(int *x,int *y)
{
int z;
z=x+y;
return(z);
}
OUTPUT:
The Sum is: 100

Leave a Reply

Your email address will not be published.