← Back to archive

Stdle #60 · conversions · 2026-08-05

What does this C++ snippet output?

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

#include <iostream>
#include <string>
int main() {
std::string s = std::string(2, 'h') + "i";
std::cout << s << "\n";
return 0;
}
Conversions
4 attempts left

Answer & explanation