If the encoding is in C99 or C11, you can use the flexible elements of the array (you do not give an explicit dimension, but you should have an agreement on this at runtime in your head).
typedef struct { unsigned No_Of_Employees; char* Employee_Names[];
For any array, each slot of a flexible array element has a fixed size. I use a pointer (e.g. 8 bytes on my Linux / x86-64 machine).
(In older compilers, before C99 standards, you can try to give a size of 0 , for example char* Employee_Names[0]; even if it is against the standard)
Then you should highlight such a structure using, for example,
st_employees* make_employees(unsigned n) { st_employees* s = malloc(sizeof(s_employees)+n*sizeof(char*)); if (!s) { perror("malloc make_employees"); exit(EXIT_FAILURE); }; s->No_of_Employees = n; for (unsigned i=0; i<n; i++) s->Employe_Names[i] = NULL; return s; }
and you can use (with strdup (3) duplicating the line on the heap), it like
st_employees* p = make_employees(3); p->Employee_Names[0] = strdup("John"); p->Employee_Names[1] = strdup("Elizabeth"); p->Employee_Names[2] = strdup("Brian Kernighan");
You will need the function void destroy_employee(st_employee*e) (on the left as an exercise for the reader). Probably it should go through i to free every e->Employee_Names[i] , then free(e); ...
Remember to document the memory usage agreements (who is responsible for calling malloc and free ). Read more about C dynamic memory allocation (and fear memory fragmentation and buffer overflows and any other undefined behavior ).
If you use GCC older than GCC 5, you must compile with gcc -std=c99 -Wall , since the standard standard for older GCC 4 compilers is C89. For new compilers, request all warnings and many others, for example. gcc -Wall -Wextra ...