Edit: actually looks like it is UB in C++ but not C
Even things like “printf” can’t be implemented purely in standard C. Even making a syscall is outside of the scope of the C standard.