0
cout << "This " << "is " << "awesome!" ; cout << "This is awesome!"; I'm getting same result : then why we use extra angles<?
why we don't use once instead again and again...?
5 Answers
+ 2
Why did you use it? Its useless use of it.
You can do this -
cout <<"My Name is "<< name << " . I love coding". <<endl;
+ 1
raj
The reason you're getting the same results, is because you simply brokevdown the full statements into bits using "<<"
The appropriate reason for using multiple << is when you want to inject the value of a variable into a statement
Example
========
#include <iostream>
using namespace std;
int main(){
int age = 17;
cout <<"I am "<<age<< " years old";
return 0;
}
Result
======
I am 17 years old
Using multiple << to print an ordinary sentence is just a waste of time
+ 1
I said its just a waste of time
+ 1
ohh thanks a lotđđđ you gave answer when I posted one more post at same time đđđ
0
you aren't understanding me I am saying that why the angle bracket are being used after every word instead we can do by putting only one time before the sentence