cs-self-learning/Cprogramming/main_advanced.c
2023-05-26 08:45:03 +00:00

14 lines
No EOL
322 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <stdio.h>
int main(int argc, char *argv[]) {
//argc表示传递的字符串的数目argv是一个指针数组每一个指针指向一个字符串
int i;
printf("The program receives %d parameters:\n", argc);
for (i=0; i<argc; i++) {
printf("%s\n", argv[i]);
}
return 0;
}