C++ Constant


Some words are reserved to do specific tasks. Such words are known as keywords .

 List of C++ Keywords :-

Backslash Character C++ Constant :- 

Backslash character                                Meaning

\a (alert)                                            Produces an audible alert signal

\b(backspace)                                   Move the cursor back one space

\f(form feed)                                      Moves the cursor to the next page

\n (new Line)                                     print a new line

\r(carriage return)                              Print a carriage return

\t (horizontal tab)                               Print a horizontal tab

\v(vertical tab)                                   Prints a vertical tab


Example of Character C++ Constant :-


void main()
int a,b,c;
cout<<"Enter the value for a "<<endl;
cout<<"Enter the value for second variable"<<"\n"<<endl;
cout<<"\r the total of a and b is"<<"\t"<<c<<endl;

Result of C++ Constant :-

C++ Constants


C++ Reserved words

asm case calss default double extern dfriend inline new protected return sizeof switch throw union void
auto catch const delete else float goto int operator public short static template try unsigned volatile
break char continue do enum for if long private register signed struct this typedef virtual while


Follow Us

Contact Us


Back to Top