c program to add two integers by passing arguments to function using pointers

void sum(int *a,int *b,int *t);//fn declaration
int main()

int num1,num2,total;
printf(“n Enter first number”);
printf(“Enter the second number”);
sum( &num1,&num2,&total);//fn calling
printf(“n the sum total is %d”,total);
return 0;
//fn definition
void sum(int *a,int *b,int *t) // fn

Leave a Comment

Your email address will not be published. Required fields are marked *

Open chat