One option is to guess the maximum size of the rows in the array and use:
char arr[][SIZE] = {"foo", "bar"};
where SIZEshould be replaced by a number.
char arr[][4] = {"foo", "bar"};
will work with strings, but will not if you use:
char arr[][4] = {"foo", "fubar"};
When such a line compiles, gcc prints the following warning:
: [ ] char arr [] [4] = { "foo", "fubar" };
, . .