C program to add two number using pointers

				
					#include<stdio.h> 
#include<conio.h> 
void main()
{
int *p1,*p2,sum; 
clrscr();
printf(“enter two no’s: ”);
scanf(“%d%d”,&*p1,&*p2); 
sum=*p1+*p2;
printf(“sum=%d”,sum); getch();
}

				
			
**************************

Output:
enter two no’s: 
10 20
sum=30

**************************

Leave a Reply