C++ Programming Tutorial 2 - New Line Escape Character



In this tutorial you will learn everything about using and printing on new lines.

There are many methods to use new lines, the most fundermental method is to use the endl operator at the end of the cout statement.



The endl operator make sure that the next cout statement will be printedcon a new line.



The endl can be replaced by the use of the new line character \n.

the \ is an escape character.Sometimes is essential that we need to

escape many lines before the next text is printed on to the screeen 

for this in C++ the new line character can be used as required.



 \n\n will escape two lines before the next text get printed on the screen.



where the use of \n\n\n\n\n would print 5 blank lines before the next text is printed.



C++ provides us futher options to simplify the code for printing text on to the screen.



In C++ it is possible to print new lines as required inside a single cout , this is done by inserting the newline escape character where required inside the statement and continuing the text.



All the relavant codes can be downloaded by using the link given below.



Codes - https://goo.gl/XGiej4

PDF Download - https://goo.gl/9FqtKd

Visit Our Website @ www.vikilab.com

Fb Group -https://www.facebook.com/groups/vikilabs17/

Fb Page -https://www.facebook.com/vikilabs17/

Comments

  1. ayye kohenda coad download karannae mata link eka dannako
    lasithsasiru55@gmail.com me mage email eka

    ReplyDelete

Post a Comment

Popular posts from this blog

Dark Sensitive Circuit With C828 Transistor In Sinhala