+ 3
What is the difference between writing cout in this way 1. Cout<<"this"<<"is"<<"awesome" and this way 2.Cout <<"this is awesome"
6 Respostas
+ 4
The advantage of the first way is that you could print out variables on the same line as text.
+ 3
well the first way just shoves it all together since there are no spaces in your message it just appends the strings together. the second way just outputs one string. first way: thisisawesome, second way: this is awesome.
+ 2
as programmer you must know you need space in memory for your programme
the first way take space from memory more than second way
+ 1
actually if you space the words they will be spaced. I guess its just to teach you the function
0
in 1. there will be no spaces
2. there line comes as it is
0
you can write in both ways but 2nd one is better.