I can\'t understand what the \'\\0\' in the two different place mean in the following code:
string x = \"hhhdef\\n\";
cout << x << endl;
x[3]=\'\
The \0 is basically a null terminator which is used in C to terminate the end of string character , in simple words its value is null in characters basically gives the compiler indication that this is the end of the String Character Let me give you example - As we write printf("Hello World"); /* Hello World\0 here we can clearly see \0 is acting as null ,tough printinting the String in comments would give the same output .