&test1 is a pointer to a record. That's why you get 2686752 for the first output. The one you are pointing to is dereferencing * the 21st position of test1 ((char *)<- casts what follows as a pointer to char (&test1+20) <- the address of test1 + 20 char positions). That would give it the position of test1.x and the printf statement is told to print it as a digit.
No comments:
Post a Comment