Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Strings.

CHECKTask 15 of 20 · step 7: Drills: check yourselfsnprintf doesn't fit
snprintf doesn't fit in practice/02/

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

Details & hint
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'.

practice 02 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p02_card main.c)
target_link_libraries(p02_card PRIVATE course_input)