initialize array of structs in c code example
Example 1: how to initialize an array in c
double balance[5] = {1000.0, 2.0, 3.4, 7.0, 50.0};
Example 2: how to initialize a struct in c
typedef struct MY_TYPE {
bool flag;
short int value;
double stuff;
} MY_TYPE;
void function(void) {
MY_TYPE a;
...
a = { true, 15, 0.123 }
}