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