K
Kavya
Here is the code
int main(){
struct node{
int a;
int b;
int c;
};
struct node s={3,5,6};
struct node *ptr=&s;
printf("%d",*(int*)ptr);
}
Will the last printf always result in correct output? Is it safer to
access data members of structure this way?
int main(){
struct node{
int a;
int b;
int c;
};
struct node s={3,5,6};
struct node *ptr=&s;
printf("%d",*(int*)ptr);
}
Will the last printf always result in correct output? Is it safer to
access data members of structure this way?