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/04/

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 04 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p04_average main.c)
target_link_libraries(p04_average PRIVATE course_input)