Is the below declaration valid in C?
char key[] = {};
If not why not?
Per the online C2011 standard, it is not valid; you may not have an empty initializer list (see 6.7.9, Syntax). That doesn't mean a specific implementation can't offer an empty initializer list as an extension, but the utility would be unclear.
Beyond that, the compiler has no way of knowing how much storage to set aside for the array.