← Back to archive

Stdle #11 · numbers · 2026-06-17

What does this C++ snippet output?

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

#include <iostream>
#include <type_traits>
int main() {
short a = 3, b = 4;
auto c = a * b;
std::cout << c << " "
<< std::is_same_v<decltype(c), int>
<< "\n";
}
Numbers
4 attempts left

Answer & explanation