A string literal or a string constant is a sequence of characters from the system's character set,
enclosed in double quotes.By default ,the null character '\0' is assumed as the last character in a
string literal. To have a double quotes itself as a character in the string constant, an escape
sequence '\'' is used.
"hello" is a valid string literal.The actual number of characters in this string literal is 6 including
the null character at the last.The null character is invisible here.Six bytes are required to store this
string in memory.However, the physical length of the string is 5 characters.
enclosed in double quotes.By default ,the null character '\0' is assumed as the last character in a
string literal. To have a double quotes itself as a character in the string constant, an escape
sequence '\'' is used.
"hello" is a valid string literal.The actual number of characters in this string literal is 6 including
the null character at the last.The null character is invisible here.Six bytes are required to store this
string in memory.However, the physical length of the string is 5 characters.
No comments:
Post a Comment