C PROGRAMMING

write a c program to add two numbers using pointers

#include <stdio.h>
main()
{
int first, second, *p, *q, sum;
printf("Enter two integers to addn");
scanf("%d%d", &first, &second);
p = &first;
q = &second;
sum = *p + *q;
printf("Sum of the numbers = %dn", sum);
getch();
}
Show More

Related Articles

Leave a Reply

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

Back to top button