Created
December 2, 2017 11:57
-
-
Save AhmedHelalAhmed/a2ac4fb0f4269172ac1398ac648de4af to your computer and use it in GitHub Desktop.
reference to pointer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int z=5; | |
int* x; | |
int*& y=x; | |
x=&z; | |
cout<<"x= "<<x<<endl; | |
cout<<"y= "<<y<<endl; | |
cout<<"*y= "<<*y<<endl; | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment