Explain use of different stream manipulators in C++?
In C++, stream manipulators are tools that modify the behavior of input and output streams. They are used to format the data being read from or written to streams like `cin` and `cout`. Here are some commonly used stream manipulators:
1. setw(int n): Sets the field width of the next input or output operation to n spaces.
2. setprecision(int n): Sets the floating-point precision to n digits.
3. setfill(char c): Sets the fill character used ___ ______ ____ ________ ___ __________ ___ ____ _________ ________ ____ ___.
_______ _____ ________ __________ __________.
_______ _________ ______ ______ ____ ______ ____ _____ ______ _________ __________.
_______ _________ _________ ______ _________ _________ __________ _____ ____ _______ ______.
____ _______ _______ ________ __________ _________ ____ _______ __________ ___ _______.
___ _____ _____ __________ _________ ____.
_______ ______ _____ ___ ____ ___ ______.
___ _________ __________ __________ ____ ______.
_________ _____ _____ _______ _________ ___ _______ ________.
_____ __________ _______ _________ ___ ______.
_________ ______ _____ ____ ____ ______ _______ __________.
_______ ______ ____ _______ ____ _________.
___ _______ ______ _______ _______ ______ _______.
___ _______ ______ ___ _____ ___ ___.
________ _____ _____ ________ ___ ___ ____ ____ _______.
____ ________ ___ ____ ________ _______ ____ _________ ______ _____ _____.
__________ _____ _____ _______ _______ _______ _______ ____ _________ __________.
______ ________ ____ __________ ______ _______ ____ ______ ___ __________ _______.
________ ____ ___ _______ ______ _________.
____ __________ _______ _________ __________ _______.
___ ______ _________ ____ _________ _______ _______ __________ __________ __________ _________ _____.
______ ________ ______ ____ __________ _________.
____ ___ ___ ____ ____ _________ _____.
______ __________ ________ __________ _____.
____ _______ __________ _________ _________ ______ _____ ____ ____ _____ ________.
___ ____ ________ ___ ________.
_____ _________ _______ ______ ____ ____ __________ ____ ______.
_______ _______ ______ ____ _______ ___ _________ ________ ____.
Get Full Answer on WhatsApp