Accessing memer fields once casting is done

Viewed 7

is it possible to cast a structure pointer to a character pointer and then be able to access the fields of a struct with the char pointer, like the ff? struct student {int id; char *p;} and then struct student *s_stud ={{13,"jacob"},{12,"lia"}} char *stud = (char *) s_stud and then be able to do sth like (*(stud+i))->id

0 Answers
Related