Skip to content
Quiz · Operators and Expressions · lesson 4 of 8

Quiz — whether the function is called

What does the program print?

C++
#include <iostream>

bool is_small(int x) {
    std::cout << x;
    return x < 10;
}

int main() {
    bool r = is_small(5) || is_small(20);
    std::cout << ' ' << r << '\n';
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way