Write a program two number add using pointer
#include<iostream>
using namespace std;
int main()
{
int *p,*q,a,b,sum ;
cout<<"enter the two number: ";
cin>>a>>b;
p=&a;
q=&b;
sum=*p+*q;
cout<<"sum: "<<sum;
return 0;
}
Write a program two number add using pointer
#include<iostream>
using namespace std;
int main()
{
int *p,*q,a,b,sum ;
cout<<"enter the two number: ";
cin>>a>>b;
p=&a;
q=&b;
sum=*p+*q;
cout<<"sum: "<<sum;
return 0;
}