In C++, streams have a built-in fill character that can be set using the std::setw()
function. This fill character is used automatically when printing elements with a specified width.
On the other hand, print()
in some programming languages may not have a built-in fill character or width specifier, requiring developers to manually add padding using loops or string concatenation.
Asked: 2022-12-18 11:00:00 +0000
Seen: 14 times
Last updated: Feb 02 '23