C++ program to illustrate pointers

#include<iostream>
using namespace std;
int main()

{

             int a=15;

             int *ptr;

             int **pptr;

             ptr=&a;

             pptr=&ptr;

             cout<< a << *ptr << **pptr;

             return 0;

}

Output

15  15  15

Leave a Reply

Your email address will not be published.