Program to add two number using pointers

Write a Program to add two number using pointers:-

#include<stdio.h>

void main()
{
int *p1,*p2,sum;

printf("enter two no’s: \n");
scanf("%d%d",&*p1,&*p2);
sum=*p1+*p2;
printf("sum=%d",sum);
}

Related Posts