Differentiate between single character constant and string constant
Answers
Answered by
9
String constant is written in (" " )double quotes"
while character in single.(' ')
Answered by
7
A character constant like '!' represents a single character. A string literal between double quotes usually represents multiple characters. A string literal like "!" seems to represent a single character, but it actually contains two: the ! you requested, and the \0 which terminates all strings in C.
Similar questions
Social Sciences,
7 months ago
Social Sciences,
7 months ago
Biology,
7 months ago
English,
1 year ago