What does this program print?

from Exceptions
C++23 (GCC 13.3.0) intermediate 2 min

What does this program print?

C++
#include <iostream>
#include <stdexcept>

int main() {
    try {
        throw std::out_of_range("index");
    } catch (const std::invalid_argument& error) {
        std::cout << "invalid: " << error.what() << '\n';
    } catch (const std::logic_error& error) {
        std::cout << "logic: " << error.what() << '\n';
    } catch (const std::exception& error) {
        std::cout << "standard: " << error.what() << '\n';
    }
}
Open in playground
Report an error