Sunday, 21 June 2015

Sum Of Pointer addition in C Program Language

Pointer Addition in C Program


About Addition Pointer : The Addition Pointer in c program using for addition two pointer in the c programming Language. 

Program
sum of pointers

#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 entered numbers = %d\n",sum);
   return 0;
}

Output

Enter two integers to add
24
12

Sum of entered numbers = 36


No comments:

Post a Comment