M
M
asked

Expert
Abhay Jajodia answered
Hi M Idrees Gul,
It usually will not cause an error. The " " is just a space, used to make the output readable.
Without it, the text prints back to back:
cout << "Hey." << "Are you enjoying the course?";
Output:Hey.Are you enjoying the course?
With a space in between:
cout << "Hey." << " " << "Are you enjoying the course?";
Output:Hey. Are you enjoying the course?
So " " is not required for the program to run, it is just for nicer output.
If you have more questions, I am here to help 😊
C++
This question was asked as part of the Learn C++ Basics course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer