The null character (also '\0'), abbreviated null terminator, is a control character with the value NUL. Its the same in C and objective Czero
The character has much more significance in C and it serves as a reserved character used to signify the end of a ,often called a null-terminated stringstring
The length of a C string (an array containing the characters and terminated with a character) is found by searching for the (first) NUL byte.'\0'
C++ s are "counted" strings - i.e., their length is stored as an integer, and they can contain any character. When you replace the third character with a std::string nothing special happens - it's printed as if it was any other character (in particular, your console simply ignores it).\0
In the last line, instead, you are printing a C string, whose end is determined by the first that is found. In such a case, \0 goes on printing characters until it finds a cout, which, in your case, is after the third \0.h