I'm wondering if there is a standard name for the "<<" and ">>" operators? This is mostly in the context of teaching C++ and using those operators as part of stream input/output. If I need to read code or prompt for student responses (such as cout << "Hello";
), I'm not sure how to verbalize those symbols. Is there a convention when reading them out loud?
Improved version of this question: How do you read the "<<" and ">>" symbols out loud?
This operator (<<) applied to an output stream is known as insertion operator.
“>>” is extraction operator because “it extract data enter by user from console or input screen to some storage location identified by variable”.
When not overloaded, left-shift and right-shift and some people call them that even when used with streams, but insertion and extraction is a lot more common in that context. They are also sometimes informally called put to and get from. IIRC, Stroustrup favoured that last form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With