C++ program to find address of variable using pointers.





#include<iostream>

using namespace std;


void pointers()

{

    int a;

    int *p;

    

    cout<<"Please Enter A Value: "<<endl;

    cin>>a;

    p=&a;

    

    cout<<"You Entered:"<<*p<<endl;

    cout<<"Address Of "<<a<<" is:"<<p<<endl;

    

}


int main()

{

    pointers();

    return 0;

}

No comments:

Post a Comment

Internet Celebrity Shaam Idrees & his wife Sehar aka Froggy decided to live separately

Famous YouTuber Sham Idris and his wife Sahar aka Froggy have decided to live separately for some time. Sham Idris informed his fans on soci...