📄 tsnprintf.c
字号:
/* * If your system does not provide snprintf(), this program will compile * but will have an undefined error from the linker. * * If you are using the lib/snprintf.c function that is supplied for * systems without snprintf(), you should get an error output from our * library function. * * If your system provides the function, and it works, there should be * no output. */#include "unp.h"intmain(int argc, char **argv){ int n; char buf[1024]; n = snprintf(buf, 4, "%d", 9999); if (n > 3) printf("error: snprintf overflowed buffer, n = %d\n", n); exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -