+ 2

What's the difference between ' ' and " "

Sry if this question has been already done, but I haven't found it with the filter so I guess it isn't.

12th Jun 2019, 3:55 AM
DJew
DJew - avatar
3 Réponses
+ 2
A single quote is treated as a single character, while double quotes create a string literal.  'a' is a single character literal, while "a" is a string literal which includes an 'a' and a null terminator.
12th Jun 2019, 4:37 AM
Sreejith P
Sreejith P - avatar
0
' ' (single quotes) is generally used for characters while " "( double quotes) is used for string
12th Jun 2019, 4:22 AM
Sreejith P
Sreejith P - avatar
0
Sree so how does it affect to my programm whether if I choose one or another?
12th Jun 2019, 4:24 AM
DJew
DJew - avatar