← Back to archive

Stdle #86 · containers · 2026-08-31

What does this C++ snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

#include <iostream>
#include <array>
int main() {
std::array<int,3> a = {10, 20, 30};
std::cout << a.size() << " " << a[2] << "\n";
}
Containers
4 attempts left

Answer & explanation