Answer to Question #186173 in C++ for Ajith

Question #186173

Develop a C++ program to read the value from user and display the address using wild pointer.


1
Expert's answer
2021-04-29T06:53:35-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS