Back to Browse

IO Operators in OOP | IO Operators in C++ | Input Output Operator | IO Operator |C++ Programming|OOP

163 views
Mar 20, 2021
5:55

C++ comes with libraries that provide us with many ways for performing input and output. In C++ input and output are performed in the form of a sequence of bytes or more commonly known as streams. Input Stream: If the direction of flow of bytes is from the device (for example, Keyboard) to the main memory then this process is called input. Output Stream: If the direction of flow of bytes is opposite, i.e. from main memory to device (display screen) then this process is called output. The two keywords cout in C++ and cin in C++ are used very often for printing outputs and taking inputs respectively. These two are the most basic methods of taking input and printing output in C++. To use cin and cout in C++ one must include the header file iostream in the program. Standard output stream (cout): Usually the standard output device is the display screen. The C++ cout statement is the instance of the ostream class. It is used to produce output on the standard output device which is usually the display screen. The data needed to be displayed on the screen is inserted in the standard output stream (cout) using the insertion operator. standard input stream (cin): Usually the input device in a computer is the keyboard. C++ cin statement is the instance of the class iostream and is used to read input from the standard input device which is usually a keyboard. The extraction operator is used along with the object cin for reading inputs. The extraction operator extracts the data from the object cin which is entered using the keyboard. You can find other videos of C++ and OOP here https://www.youtube.com/playlist?list=PLFh74Amhz04r0lEvRhmGFdq_gTiM-9_v- Like, Share and Subscribe to our channel.

Download

0 formats

No download links available.

IO Operators in OOP | IO Operators in C++ | Input Output Operator | IO Operator |C++ Programming|OOP | NatokHD