Pointers are special variable that stores address of another variable.
#include<iostream>
using namespace std;
int main(){
int a = 10;
int *ptr = &a;
int **pptr = &ptr;
cout << &ptr << " = " << pptr << "\n";
return 0;
}
OUTPUT-
0x61ff04 = 0x61ff04
No comments:
Post a Comment