About us

C Program to find the addition of two numbers using call by reference

C Program to find the addition of two numbers using call by reference

c-program-find-addition-two-numbers-using-call-by-reference


#include<stdio.h>
#include<conio.h>
int sum(int *,int *);

void main()
{
 int a,b;
 clrscr();
 printf("Enter any two numbers for Addition\n");
 scanf("%d %d",&a,&b);
 printf("%d",sum(&a,&b));
 getch();
}

int sum(int *x,int *y)
{
 return(*x + *y);
}

OUTPUT

Enter any two numbers for Addition
23 45
68


------------------------------------------------------------------------------------------------------------


You can also visit:-