cin, cout, endl keyword in c++ programming language
C++ Basic Input/Output
If bytes flow from main memory to device like the printer, display screen, or a network connection, etc, this is called an
output operation.
If bytes flow from a device like a printer, display screen, or a network connection, etc to main memory, this is called an
input operation.
Standard output stream (cout) Example
#include <iostream>
using namespace std;
int main( ) {
char ary[] = "Welcome to C++ tutorial at BASICLEARNER.COM";
cout << "Value of ary is: " << ary << endl;
}
Standard input stream (cin) example
#include <iostream>
using namespace std;
int main( ) {
int age;
cout << "Enter AGE: ";
cin >> age;
cout << "age is: " << age << endl;
}
Standard end line (endl) example
#include <iostream>
using namespace std;
int main( ) {
cout << "C++ Tutorial";
cout << " BASICLEARRNER"<<endl;
cout << "End of line"<<endl;
}