answersLogoWhite

0

A character type constant is a character, a char, while a string type is an array of characters. The character type constant is one character and is delimited by single quotes. The string type constant is zero or more characters and is delimited by double quotes.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Difference between character and string?

A string ends with a '\0' character,but character is not.


What is the difference between A and A in string?

Well, A is an identifier; 'A' is a character-literal; "A" is a string literal (of 1 character); "'A'" is another string literal (of 3 characters).


Explain different types of constant?

Integer constants Character constants Real/floating point constants String constants


What is the difference between 'a' and a in C?

a -- identifier 'a' -- character-literal "a" -- string-literal


What are character constants?

A character constant is a single character in the host's character set, such as 'A', 'a', '0', '%', etc. Note the use of the single quotes instead of double quotes. (Double quotes are used for string constants, not character constants.) A character constant maps to a specific int (integer) value, but assuming anything about that relationship is non-portable.


Whats the difference between character and string if only one character is there?

Nothing Most computer languages have a string-termination character that is "invisible" to people. So, while a character variable may contain 'A', and a string variable appears to be simply "A", the string variable will actually have two characters. This difference is often masked by compilers and languages, but it exists nonetheless, and it is sloppy programming practice to compare a string to a character (or vice versa) without doing a type cast.


What is the role of plus operator between two string constant?

The plus operator between string constants allows string concatination: string a = "Hello, "; string b = "World!"; string c = a + b; The output of c would be: "Hello, World!".


What is the difference between Strings and Arrays in c?

There is no difference. A string is just an array of type char. The only real difference is that we do not need to keep track of the length of a string because strings are null-terminated in C. If a string does not have a null-terminator, then it is just an ordinary array of character values.


What is the difference among string and string buffer and string builder?

String is the immutable class that means the object f that class never be changed. String is the Sequence of character.


How string constants are declared in c?

Some strings are constants, others aren't; some constants are strings, other aren't. So these are unrelated things. Examples: "text" -- constant string 123 -- constant number char s[40] -- variable string


What is the difference between rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


Whats The difference between a 6 and 7 string guitar?

There is practically no difference. The 7-string guitar has one lower string that the 6-string does not. It is usually tuned to B(natural).