BUY TELUGU TUTORIAL DVD'S:::: SEO::3500/-,DCA(DOS,WINDOWS,WORD,EXCEL,POWER POINT, MS ACCESS, INTERNET CONCEPTS)::499/-,DTP(PHOTOSHOP,PAGEMAKER, CORELDRAW,TELUGU TYPING)::999/-,C::700,C++::900,TALLY ERP 9:: 999,ORACLE:999/-,CORE JAVA::1000/-,SPOKEN HINDI:500,HTML::500/-,AUTOCAD::2500/-,DCA+DTP::1000/-,DCA+TALLY::1000,C,C++,JAVA::1500, ALL COURSES(DCA,DTP,C,C++,JAVA,ORACLE,TALLY,HTML,SPOKEN HINDI,AUTOCAD):: 3500/-..CONTACT : SYED HAFIZ, SHOPPING COMPLEX,8INCLINE COLONY,GODAVARI KHANI,KARIMNAGAR, TELANGANA,CELL:9395306603,EMAIL:COOLHAFI7@GMAIL.COM.
Home / c++ / C++ tutorial for beginners in telugu Part 5

C++ tutorial for beginners in telugu Part 5

C++ tutorial for beginners in telugu

The endl function ends the current line and starts a new line. In that way, it is much like the ‘n’ character. However, endl also flushes the output stream. When outputting text to a screen or a file in C++, data is fed into an output stream connected to the file or screen. Just because the data is in the stream, you cannot guarantee it has been written to the screen or the file. The endl function is one way to guarantee the text in that stream has been flushed.

The varying line-ending characters don’t matter, assuming the file is open in text mode, which is what you get unless you ask for binary. The compiled program will write out the correct thing for the system compiled for.

The only difference is that std::endl flushes the output buffer, and ‘n’ doesn’t. If you don’t want the buffer flushed frequently, use ‘n’. If you do (for example, if you want to get all the output, and the program is unstable), use std::end

Constants

The difference between variables and constants is that variables can change their value at any time but constants can never change their value. (The constants value is locked for the duration of the program.)
Constants can be very useful, PI for instance is a good example to declare as a constant.

Defining a constants

With the pre-processor directive “define” it is possible to define your own constants.

The format of the pre-processor directive #define is:

scape codes

Escape codes are used to represent characters that are difficult to express otherwise in the source code.
For instance a tab (t). Escape codes all start with a backslash ().

n

Newline

r

carriage
return

t

Tab

v

vertical
tab

b

Backspace

f

form feed
(page feed)

a

alert
(beep)

single quote ()
double quote ()
? question mark (?)
backslash ()

About Hafiz

Check Also

C++ tutorial for beginners in telugu Part 1

c++ tutorial for beginners in telugu In this Video Tutorial you can learn c++ in …

Leave a Reply

Your email address will not be published. Required fields are marked *

STATE BANK OF HYDERABAD, ***NAME:Hafiz SD, BRANCH:JALLARAM, ACCOUNT.NO:62041435239, IFSC CODE:SBHY0020609,****, ANDRA BANK*** NAME:SYED HAFEEZ BABA, BRANCH:8INCLINE COLONY, ACCOUNT.NO:116710100037533****SBI****NAME:SYED HAFEEZ BABA,ACCOUNT NO:35321924009,IFSC CODE:SBIN0013338,BRANCH:GODAVARIKHANI.,...