I am once again experimenting with C syntax and I wrote this:

Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct person
{
    char name[50];
    unsigned int age;
    char hc[10];
} PERSON;
int main(void)
{
    PERSON *myPerson = malloc(sizeof(PERSON));

    strcpy((char*)myPerson,"Test");
    strcpy((char*)myPerson+56, "Brown");

    printf("Name: %s\n",myPerson);
    printf("Hair Color: %s\n", *((char*)myPerson+56));
    getchar();
    return EXIT_SUCCESS;

}
Basically, 56 bytes into myPerson is the confirmed compiled location where myPerson->hc should be. It would normally be 54 bytes in but apparently there are 2 bytes of padding.

However, if I replace the myPerson+56 with myPerson->hc it works, if I do myPerson+56 casted to char* then the "Brown" text does not appear in the printf.

The disassembly (x64) is slightly different between the two but both times it does actually have the same effect of going 56 bytes into the struct. Again, I know this is "not a good idea" but note that I am simply using this as an experiment to play with the memory capabilities of C. Thank you.