- 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
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand