+ 4
What is the difference between cout<<"hello" and cout<<'hello'?
6 Answers
+ 2
single character vs string litetal
đ€
+ 1
"hello" is const char* type.
'a' is char But 'hello' is INT.
Multiple characters in two single questions is INT type.
+ 1
' ' is for char.
" " is for string.
+ 1
'hello' evaluates to an int based on the first 4 characters (Which become its bytes). Its actually not a string at all.
"hello", however is a string.
0
a is String and another is Character type
0
' ' prints the statement inside it ..
" " searches for the variable inside the double quotes