?? varargs.c
字號:
/*
* @(#) varargs.c 1.1 91/09/01 23:08:45
*
* This program can be used to verify that the stdarg.h file is set up
* correctly for your system. If it works, it should print one line with the
* text "stdarg.h works".
*/
#include <stdio.h>
#include "stdarg.h"
main(int argc, char *argv[])
{
varargs_test("%s %s\n", "stdarg.h", "works");
}
varargs_test(char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
while (*fmt) {
if (strncmp("%s", fmt, 2) == 0) {
fputs(va_arg(ap, char *), stdout);
fmt += 2;
} else {
putchar(*fmt);
fmt++;
}
}
va_end(ap);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -