← Back to archive

Stdle #26 · classes · 2026-07-02

What does this C++ snippet output?

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

#include <iostream>
#include <utility>
int main() {
int a = 1, b = 2, c = 3;
std::swap(a, b);
std::swap(b, c);
std::cout << a << b << c << "\n";
return 0;
}
Classes
4 attempts left

Answer & explanation