+ 1
what is the deference between single and double quotes? where are they really used for?
2 Answers
0
they're used for the same thing.
But if you want to output for instance a string with a quotation marks, you can wrap your string with double quotes and single quotes. the inner quote will be outputed and the outer one will be used to consider your text as a string.
0
for a character we use single quotes
eg : char s='a' ;
for a string we use double quotes
eg : string s="hello world" ;