how to determine an empty structure element

I create a structure like this:

struct test
char element1[20];
char element2[20];
struct test MyStruct[50];

Now some values are written into it.
My Problem is, i need to determine, which element is empty / has no allocated value.
How can I do this?

Initialize the structure with a loop, and set all elements to 0x00, that way you can check quickly if a string was set.

Another option would be to add an additional field to the test struct, to indicate wether the struct has no allocated value, is empty, or has a value…