Can I initialize a stuct in C in the following way:
struct database {
char* Name;
char* Title;
char* DOB;
int EmployeeNo;
} people[100];
people[0] = { "Jon", "Manager", "1-1-1990", 12345 };
people[1] = { "Bob", "Accountant", "1-1-1990", 54321 };
I am using gcc version 9.2.1 20191130 (Debian 9.2.1-21)
people[0] = (struct database){ "Jon", "Manager", "1-1-1990", 12345 };. Like designated initializers, compound literals are a feature of C99 and later versions of C.