Reference: C / C ++ language, NULL, '\ 0' and 0 of the difference between
- Not in the C language null character this thing '', but empty string ""
- Actually called null character '\ 0', or the corresponding int 0
- When declaring a string, all characters will be the default setting to '\ 0' is int value 0
- Therefore, when determining the actual content of the character, it is determined only '\ 0' or 0 can determine the end of the string
- Because the char can be freely converted int, so a == '\ 0' and a == 0 is exactly the same