Insert a New Line in C++:
(1) “\n” is used for inserting a new line or print output in the next line.
(2) Sample C++ language code and its output, as shown:

#include <iostream> using namespace std; int main() { cout << “My first C++ Language Line!\n”; cout << “My second C++ Language Line!\n”; return 0; } |
(3) After that go to the “Build” menu and select the “Build” option for publishing the code as shown.

(4) After building the code, press the “Run” button, as shown.

(5) After pressing the “run” button, the output screen is opened, as shown.

(6) “\n”: Enter one “\n” means to insert only one line, if you enter two “\n\n” then the system inserts two lines and vice versa.
SWITCH Statement in C Language FOR Loop in C Language WHILE Loop in C Language DO WHILE Loop in C Language Use of LOWER Function in SQL REVERSE (Transact-SQL)– Microsoft Docs |