C Program Using A Function That Calculates The Sum And Average Of Two Numbers. Use Pointers And Print The Values Of Sum And Average In main()


Program Code:

#include <stdio.h>
int main()
{
   int first, second, *p, *q, sum;
   printf("Enter two integers to add\n");
   scanf("%d%d", &first, &second);
   p = &first;
   q = &second;
   sum = *p + *q;
   printf("Sum of the numbers = %d\n", sum);
   return 0;
}


To learn more about programming and coding visit our website. PDF study materials also available on our website.

Log on to: www.thecode11.com