How is Memory Allocated to variables of different data types?
I wrote the following Code. #include<stdio.h> int main() { int x = 1 ; int *j = &x ; int y = 2 ; int *t = &y ; printf("%p\n" , (void *)j); printf("%p" , (void *)t); } Output is 0028FF14 0028FF10 . The Point I want to make is that the difference between the addresses is `4'. Whereas in this case #include<stdio.h> int main() { char x = 't' ; char *j = &x ; char y = 'f' ; char *t = &y ; printf("%p\n" , (void *)j); printf("%p" , (void *)t); } Output is 0028FF17 0028FF16 The difference is 1 . Difference In First Case is 4 . Whereas in the second case it is 1 . Why is it so? And What will I get if I