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

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