For the simple code below i expected output as "" hello"". But instead I'm getting output as just hello without any quotation. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

For the simple code below i expected output as "" hello"". But instead I'm getting output as just hello without any quotation.

#include <iostream> using namespace std; int main() { cout<<"""hello"""; return 0; } What is the reason behind it and what is the solution to print the message that begin with quotation or any other symbols??

2nd Dec 2016, 8:22 AM
fathima shahanaz
fathima shahanaz - avatar
1 Answer
+ 3
In c++ if you want to print " then use \" Your eg will be written as cout <<"\"Hello\"";
2nd Dec 2016, 8:26 AM
Venkatesh(Venki)
Venkatesh(Venki) - avatar