2-nd part

This commit is contained in:
2024-09-17 20:54:07 +03:00
parent 074349e6f6
commit 161e517c0b

18
2.c Normal file
View File

@@ -0,0 +1,18 @@
#include <stdio.h>
int main(int argc, char *argv[], char **env){
int i;
for(i=0; i < argc; ++i){
printf("\n&d: %s\n", i, argv[i]);
}
for (char **p=env;*p;p++){
printf("\n%s", *p);
}
char tmp[256];
fork();
getpid();
getppid();
scanf("%s", tmp);
return argc;
}