Skip to the task
Layout
Back to classic view

You are looking at lesson 9. Your place is still Practice test 1, task 1: About.

CHECKTask 15 of 20 · step 7: Drills: check yourself

snprintf doesn't fit

What ends up in s, and what does snprintf return?

char s[10];
int r = snprintf(s, sizeof s, "%d-%s", 2026, "ruduo");
Stuck?

s = "2026-rudu", r = 10: 10 characters were needed, 9 fit plus '\0'.