'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 ''
.
These four are equivalent:
char a[6] = {0};
char a[6] = {0, 0, 0, 0, 0, 0};
char a[6] = {'', '', '', '', '', ''};
char a[6] = ""; // sixth null byte added automatically by the compiler
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…