In C99, you can assign each structure in one line. I do not think that you can assign an array of structures in one line.
C99 introduces complex literals. See Dr. Dobbs's Article here: New C: Compound Literals
theTest[0] = (test_t){7,8,9};
theTest[1] = (test_t){10,11,12};
You can assign to a pointer as follows:
test_t* p;
p = (test_t [2]){ {7,8,9}, {10,11,12} };
memcpy:
memcpy(theTest, (test_t [2]){ {7,8,9}, {10,11,12} }, sizeof(test_t [2]);
gcc -std = c99 ( 4.2.4) linux.
, , .