// WECP100/hello01.c
// description: argc and argv for basic c language
// machine: loptop window11
// os: linux using wsl on windows11
// cat /etc/os-release >> PRETTY_NAME="Ubuntu 22.04.2 LTS"
// uname -a >> linux LAPTOP-2E5CQCBT 5.15.153.1-microsoft-standard-WSL2
// >> Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/
//> wsl
//$ gcc hello01.c -o hello01
//$ ./hello01 x y z
//result
//{"codeId":"WECP100hello01"}
//argc:4
//argv[0]:./hello01 argv[1]:x argv[2]:y argv[3]:z
#include
#include
int main(int argc, char *argv[]) {
printf("{\"codeId\":\"WECP100hello01\"}\n");
printf("argc:%d\n",argc);
for (int i=0; i < argc; i++){
printf("argv[%d]:%s\t",i,argv[i]);
}
printf("\n");
}