I would like to initialize an array of strings with \0. Is it right to do it like this?
char first[1024][1024] = {'\0'};
For a 2d array is better to use:
char first[1024][1024] = {{'\0'},{'\0'}};
or better yet (as suggested by @haccks):
char first[1024][1024] = {{'\0'}};
in order to avoid warnings.
{'\0'}char first[1024][1024] = {'\0'};If it is a static array, say, a global array, you do not need to do any initialization and the values of the array are set to 0 by default.
{0}.static, so I'm not sure what you're talking about.