Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - 2 . char * s; S= "Hello!" ; Why cout & lt& lts<& ltendl outputs Hello! ; S is just the string Hello! The first address, just an address?
2 . char * s; S= "Hello!" ; Why cout & lt& lts<& ltendl outputs Hello! ; S is just the string Hello! The first address, just an address?
"Hello!" Is a constant string that exists in memory, and s points to the address of this string.

In C++, cout is the first address of a string and can be output-of course, the string must end with' \0'.