What will be printed out as a result of the following program's execution:
#include <iostream>
#include <stdio.h>

int main() {
    std::cout << printf("boom!");

    return 0;
}
Explanation
"boom!5" should be printed out because printf() returns an int equal to the number of characters printed to stdout (for more details visit C++ reference printf). std::cout is synchronized with the stdout, so "boom!" will be transfered to stdout first and "5" - after that (for more details visit C++ reference ios_base::sync_with_stdio).

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести