//Problems for pointers in c++ #include using namespace std; int main() { int *xp1,*xp2=NULL; xp1=new int(50); int x=*xp1; xp2=new int(100); cout<<*xp2<<endl; cout<<*xp2+*xp1<<endl; *xp1=2000; cout<<*xp2+*xp1<<endl ; delete xp1; cout<<*xp1<<endl; }
Output:
100
150
2100
0
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
100
150
2100
0
need an explanation for this answer? contact us directly to get an explanation for this answer