Can you please tell me how is the processing of this code taking place.
Because its giving a fixed address same as mentioned in the book.
The Answer to this question is
Address of i=FFE4
value at ptr =10
Address of j=FFE2
value at prt=20
how come addresses are these, and with just a difference of 2. And why these address are fixed.
Thanks in advance
#include<stdio.h>
#include<conio.h>
void main()
{
int i=10,j=20;
const int *ptr=&i;
clrscr();
printf("Address of i=%5x \n",ptr);
printf("value at ptr=%d \n",*ptr);
ptr=&j;
printf("Address of j=%5x \n",ptr);
printf("value at ptr=%d \n",*ptr);
getch();
}