问题详情

答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关

请分析以下程序。 int main() { pid_t pid; pid = fork(); if(pid==0) printf(I am the child pr


请分析以下程序。 int main() { pid_t pid; pid = fork(); if(pid==0) printf("I am the child process, my process ID is%d ",getpid()); else printf("I am the parent process, my process ID is%d ",getpid());} 那么,该程序正确运行后的结果是

A.I am the child process, my process ID is 3744 I am the parent process, my process ID is 3987

B.I am the child process, my process ID is 3744

C.I am the parent process, my process ID is 3987

D.不输出任何信息

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题