Is it possible to declare an array of pointers and later on initialize either of them and assign a value, in a C header file?
char *i[2];
i[0] = "abc";
the following does not work.
char *x = "def"; // this will, of course.
How am I supposed to declare and assign values for an array of pointers?
This has nothing to do with header files. You cannot create a .c file and put in it code like this:
In C, all code except definitions and initialisations must be inside functions, and your second statement is neither of these – it is an assignment.
An initialisation for your array would look like this:
And that could be put in a header file, but would cause multiple definition errors if the header were used in more than one translation unit.