Skip to content

Instantly share code, notes, and snippets.

@mefahimrahman
Created September 21, 2018 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mefahimrahman/7fb0f45ae1f45caeb97d5aaeb39c4833 to your computer and use it in GitHub Desktop.
Save mefahimrahman/7fb0f45ae1f45caeb97d5aaeb39c4833 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x=7,&y=x;
cout<<"Whithout Increment: ";
cout<<&x<<" "<<&y<<endl;
cout<<x<<" "<<y<<endl;
--x;
cout<<"After x Increment: ";
cout<<&x<<" "<<&y<<endl;
cout<<++x<<" "<<y<<endl;
y++;
cout<<"After y Increment: ";
cout<<&x<<" "<<&y<<endl;
cout<<x<<" "<<++y<<endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment