pointer to structure in c

struct mcintosh{
int patel;
struct taylor{
int ** ryder;
struct mcintosh *mccullum;
}oram;
}*vetori,brien;
void main(){
int temp=10;
int *ptr=&temp;
vetori->patel=121;
brien.oram.ryder=&ptr;
vetori->oram.mccullum->oram.ryder=brien.oram.ryder;
clrscr();
printf("%d",**vetori->oram.mccullum->oram.ryder);
printf(" %d",**(*(*vetori).oram.mccullum).oram.ryder);
printf(" %d",vetori->oram.mccullum->patel);
getch();


}

Output: 10 10 garbage value

No comments: