以下程序的输出结果是()#include #include #include #include #include int main(int argc, char *argv[]){printf("===================start of file\n");pid_t pid = fork();if (pid == -1) {perror("fork error");exit(1);} else if (pid == 0) {printf("---child,my pid is %d,my parent pid is %d\n",getpid(),getppid());} else if (pid > 0) {printf("---parent my child is %d,my pid is %d,myparent pid is %d\n", pid,getpid(),getppid());sleep(1);}printf("===================end of file\n");return 0;}
A. ===================start of file---parent my child is 4759,my pid is 4758,myparent pid is 3700---child,my pid is 4759,my parent pid is 4758===================end of file
B. ===================start of file---parent my child is 4759,my pid is 4758,myparent pid is 3700---child,my pid is 4759,my parent pid is 4758===================end of file===================end of file
C. ===================start of file---parent my child is 4759,my pid is 4758,myparent pid is 3700---child,my pid is 4759,my parent pid is 4758===================end of file===================end of file===================end of file
D. ===================start of file===================start of file---parent my child is 4759,my pid is 4758,myparent pid is 3700---child,my pid is 4759,my parent pid is 4758===================end of file===================end of file