Articles added in Mathematics Lab | Cyber Lab is now open | Astronomy Lab is now open | VLSI Lab is now open | 120 SEO Tips article published | More exciting articles coming soon!




Manipulators in C++

They are operators that are used for formatting display.

e.g. endl, setw(), setprecission(), etc.
"endl" can be directly used in a program. For other manipulators, we have to include header file "iomanip.h".

endl:
--> end of line.
--> To bring cursor to next line.
--> same as command "\n".

setprecission() --> To set the numbers to be displayed after the decimal point.
Syntax: setprecission(5) --> displays 5 digits after the decimal point.

setw() --> To set width of data to be printed.



Sample program:















CACKLE comment system





Programming Resources
Computer Networking Fundamentals Android Application