I do not understand why is the pointer address changing everytime during the output for a code while I am executing the same code? The code:
int main()
{
int a;
a=100;
int *b;
b= &a;
printf("The address of a is %p\n", b);
return 0;
}
The gcc compiler output:
nikhil@nikhil-Lenovo-Product:~/Desktop$ ./a.out
The address of a is 0x7fff990d2f24
nikhil@nikhil-Lenovo-Product:~/Desktop$ ./a.out
The address of a is 0x7fffcec94eb4
nikhil@nikhil-Lenovo-Product:~/Desktop$ ./a.out
The address of a is 0x7fff70b595e4
nikhil@nikhil-Lenovo-Product:~/Desktop$