What Is Pointer....???
Pointer In C++ means That To Point out Location
Of any Variable
And Its Written *ptr(ptr Is variable Which You Want To find The Location
int xyz=786; This Is Variable
int *p=&xyz; This Is Pointer Which Is Equal To The Location Of Variable
int **p1=&p; This Also a Pointer Which Shows The Variable Which Is Placed On "p".....
Click Read More For Code :-
#include<iostream>
using namespace std;
int main()
{
int xyz=786;
int *p=&xyz;
int **p1=&p;
cout<<"xyz ="<<xyz<<endl;
cout<<"p="<<p<<endl;
cout<<"*p="<<*p<<endl;
cout<<"p1="<<p1<<endl;
cout<<"*p1="<<**p1<<endl;
}
No comments:
Post a Comment