1: #include <stdio.h>
2: int main()
3: {
4: int first, second, *p, *q, sum;
5: printf("Enter two integers to add\n");
6: scanf("%d%d", &first, &second);
7: p = &first;
8: q = &second;
9: sum = *p + *q;
10: printf("Sum of entered numbers = %d\n",sum);
11: return 0;
12: }
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Monday, 13 July 2015
Write C Program to Perform Addition of Two Numbers Using Pointers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment