when I store something in myRecord->lastname where does it get stored?
It will lead to undefined behaviour.
should I allocate memory for those two strings explicitly?
Yes, you have to allocate for the struct members lastname and employeeIDas too.
Like this:
headptr=malloc(sizeof(myRecord));
headptr->lastname = malloc(n1); // Alllocate n1 bytes
headptr->employeeIDas = malloc(n2); // Alllocate n2 bytes
However, if you assign string literals to those pointers, then you don't need to allocate memory.
headptr->lastname = "last name";
headptr->employeeIDas = "12345";
Here, you are making the pointers to point to string literals which have static storage duration.
String literals can't be modified in C (attempting to modify invokes undefined behaviour). If you intend to modify them, then you should take former approach (allocate memory) and copy the string literals.
headptr->lastname = malloc(n1); // Alllocate n1 bytes
headptr->employeeIDas = malloc(n2); // Alllocate n2 bytes
and then copy them:
strncpy(headptr->lastname, "last name", n1);
headptr->lastname[ n1 - 1 ] = 0;
strncpy(headptr->employeeIDas, "12345", n2);
headptr->employeeIDas[ n2 - 1 ] = 0;