void main(){
int i,k;
char* p;
int j;
printf("address of i is %d \naddress of k is %d \naddress of p is %p\naddress of j is %d", &i,&k,&p,&j);
}
when I tried the above code, the address of j is 4 units below k. But the address of p is no where near. Since a pointer is an integer variable that could store 4 bytes of data, why isn't it allocated on the stack like the other three variables?