Friday, 23 March 2018

Output and Input Operator

cout <<"Welcome to the Computer Language";

This causes the string in quotation marks to be displayed on screen.

'cout' is a predefined object that represents standard output stream i.e. screen.

The operator '<<' is called as insertion or put to operator.It inserts the contents of the variable on its right to the object on its left.

Input Operator :

 cin >> no;
It is an input statement and causes the programs to wait for the user to type in a number.The number keyed in is placed in the variable 'no'.

'cin' is predefined object that represents standard input stream i.e. keyboard.

The operator '>>' is know as extraction or get from operator.
It extracts or takes the value from the keyboard and assigns it to the variable on its right.

1 comment:

Codecademy Code Foundations

Popular Posts


Android (23) AngularJS (1) Assembly Language (2) Books (10) C (75) C# (12) C++ (81) Course (1) Data Strucures (4) Downloads (1) Engineering (13) flutter (1) FPL (17) Hadoop (1) HTML&CSS (38) IS (25) Java (89) Leet Code (4) Pandas (1) PHP (20) Projects (19) Python (397) R (69) Selenium Webdriver (2) Software (14) SQL (27)