← Back to archive

Stdle #117 · strings · 2026-10-01

What does this C snippet output?

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

#include <stdio.h>
#include <string.h>
int main(void) {
char dst[20] = "foo";
strcat(dst, "bar");
printf("%s %zu\n", dst, strlen(dst));
return 0;
}
Strings
4 attempts left

Answer & explanation