Develop a C++ program to read the value from user and display the address using wild pointer.
#include <iostream>
using namespace std;
int main(){
int *location;
cout<<"Enter an integer: ";
int x;
cin>>x;
location = &x;
cout<<"The address where "<<x<<" is stored is "<<location;
return 0;
}
Comments
Leave a comment