it is used because if you write cout<<xendl; and this is not correct because it seem that you have a variable named xendl and you want it's value as output and you know that cout<<x endl; it give error because the compiler does not understand space in cout statement so to differentiate two different variable or two different things in cout statement we use << means cascading operator every time and you can also right the statement as cout<<x; cout<<endl;
well endl is also an object of iostrem class to connect cout and endl u use << or u can also use "\n" for a new line
it's Syntax , when you wanna use iostream, one liner are preferred, because less is more.
agree. maybe you mean after cin?
do you understand the first >>?
dude it must have been cout << x << endl;
so, normally << and >> are bit wise, shifting operators, but under certain functions like cout and endl it's actually a function call. so when you do myFunction(parameters), you make a function call. it's essentially the same thing except it's a special syntax for the cout cin endl and other functions