+ 1

what is the deference between single and double quotes? where are they really used for?

1st Apr 2017, 8:26 AM
rumman
2 Réponses
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.
1st Apr 2017, 8:41 AM
Awal
Awal - avatar
0
for a character we use single quotes eg : char s='a' ; for a string we use double quotes eg : string s="hello world" ;
1st Apr 2017, 8:59 AM
Sanal Kv
Sanal Kv - avatar