- Home
- ICSE Class 8 Computers Differentiate Between the Following
Distinguish between Character and String literal
ICSE Class 8 Computers Differentiate Between the Following
Answer
Character literal | String literal |
---|---|
Character literals are written by enclosing a character within a pair of single quotes. | String literals are written by enclosing a set of characters within a pair of double quotes. |
Character literals are assigned to variables of type char. | String literals are assigned to variables of type String. |