What is the difference between c (single Quotes) and c (Double Quotes)?



Raj Said

+0 -0

The main difference between 'c' and "c" is that 'c' is a single-character literal, while "c" is a string literal. A single-character literal is a character enclosed in single quotes, while a string literal is a sequence of characters enclosed in double quotes.



Shreya Said

+0 -0

Single quotes (' ') are used for character constants, which are single characters with integer values. Double quotes (" ") are used for string literals, which are arrays of characters with a null terminator. Single quotes can also be used for multi-character constants, which are implementation-defined. Double quotes can also be used for titles of creative works. Single quotes are more common in British English, while double quotes are more common in American English. Single quotes and double quotes have different effects on the meaning and pronunciation of words.



Submit Your Response