COMPOUND LITERALS:
#include<stdio.h>
struct s{
int x;
int y;
};
int main(){
int j = 5;
printf("\n &j : %p \n",&j);
struct s *p = &(struct s){j++};
printf("\n p : %p &j : %p x : %d y : %d \n",p,&j,p->x,p->y);
return 0;
}
o/p:
-----
&j : 0x7fff416b74ec
p : 0x7fff416b74d0 &j : 0x7fff416b74ec x : 5 y : 0
a] Why is p not holding the address of j ?
b] why is j not being typecast to struct s ?