I have a question about array initialization
What is the difference between
char a[6]={0};
and
char a[6]={\'0\',\'0\',\'0\',\'0\',\'0\',\'0\
'0' is the ASCII character for the number 0. Its value is 48.
The constant 0 is a zero byte or null byte, also written '\0'.
These four are equivalent:
char a[6] = {0};
char a[6] = {0, 0, 0, 0, 0, 0};
char a[6] = {'\0', '\0', '\0', '\0', '\0', '\0'};
char a[6] = "\0\0\0\0\0"; // sixth null byte added automatically by the compiler