In C and C++ the single quote is used to identify the single character, and double quotes are used for string literals . A string literal “x” is a string, it is containing character ‘x’ and a null terminator ‘
This article was researched and written with AI assistance, then verified against authoritative sources by our editorial team.