I'm doing my first steps with C (pointers, pointer-pointer etc, I love it), so have mercy if this is a dumb question.
This fragment outputs nothing:
char buf[256];
snprintf(buf, sizeof buf, "output: %s%s%s");
puts("test");
And this fragment outputs "test" (as expected):
char buf[256];
snprintf(buf, sizeof buf, "output: %s%s");
puts("test");
=>test
Question: Which role does snprintf play here? Is there any relationship with the puts-statement or why has the puts no effect/output in the first code?