TL;DR answer - No, you cannot.
To elaborate, let me quote C11
, chapter §6.7.2.1, Structure and union specifiers
(emphasis mine)
A member of a structure or union may have any complete object type other than a
variably modified type. [...]
and, a VLA is a variably modified type.
However, quoting from the same standard, regarding the flexible array member
As a special case, the last element of a structure with more than one named member may
have an incomplete array type; this is called a flexible array member. [...]
So, you can do something like
typedef struct
{
uint8_t No_Of_Employees;
uint8_t* Employee_Names[];
}st_employees;
and later, you can allocate memory dynamically at the runtime to Employee_Names
(and Employee_Names[i]
, too) and make use of it.