#include <stdio.h> int main(int argc, char *argv[]) { printf("the program is %s\n", argv[0]); int i = argc; printf("the num of arg is %d\n", argc); for(i=1; i<argc; i++) { printf("the %dth of arg is %s\n", i, argv[i]); } return 0; }
标签:std log 程序 argc bsp [] argv pos ram
#include <stdio.h> int main(int argc, char *argv[]) { printf("the program is %s\n", argv[0]); int i = argc; printf("the num of arg is %d\n", argc); for(i=1; i<argc; i++) { printf("the %dth of arg is %s\n", i, argv[i]); } return 0; }
linux c 编程 ------ 程序入口参数,即 main 参数
标签:std log 程序 argc bsp [] argv pos ram
原文地址:https://www.cnblogs.com/god-of-death/p/8718729.html