Pointer

 #include <iostream>

using namespace std;

int main()

{

    int a=10;//data variable

    int *p;// address variable

    p=&a;// storing the address of memory of a

    cout<<p<<endl;

    *p=20;// *p is de-referencing

    cout<<*p;

}

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top