- Why will reading from std::cin first flush std::cout?
Because they are tied by default—std::cin.tie(&std::cout); - What is the difference between a unit-buffered, a line-buffered, a fully-buffered, and an unbuffered stream?
A unit-buffered stream will flush after each >>, a line-buffered stream after each \n, a fully-buffered stream when the internal buffers are full, and unbuffered ones after each write. - Why is std::iostream slower than std::filebuf and fprintf() slower that puts()?
Because iostream will perform newline translation and locale-based conversions that filebuf doesn't have to. fprintf() must scan the format string in runtime; puts() doesn't have a format string.
By the way, it is possible to scan a format string in compile time in C++ using template metaprogramming tricks! - Why does Linux kill processes simply if it feels like it...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine