Input and Output in C++
1. Input from user: We can take input from the user using cin from the iostream library.
Syntax
int var;
cin >> var;
2. Output on the console: We can print output on the console using cout from the iostream library.
Syntax
cout << “Hello World”;
high-level
New Lines
We can use \n character or endl to insert a new line.
Syntax
cout << "Hello World! \n";
cout << "Hello World!" << endl;
C++ Cheatsheet
This is a C++ programming cheat sheet. It is useful for beginners and intermediates looking to learn or revise the concepts of C++ programming. While learning a new language, it feels annoying to switch pages and find different websites for different concepts that are easily understandable. You can learn C++ concepts very easily using this cheat sheet.
C++ is a high-level programming language. It was developed in 1983 by Bjarne Stroustrup at Bell Labs. It is used for developing various applications.
Contact Us