How to accept two numbers & print the sum of given two numbers by using pointers

CWC
0 Min Read

C++ Program to accept two numbers and print the sum of given two numbers by using pointers

# include 
#include
#include 
using namespace std;
int main( )
{
int a, b,c;
a=10;
b=20;
c=*(&a)+*(&b);
cout<<c;
return 0;
}
Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version