目录: 标题| 题干| 答案| 搜索| 相关
问题

请分析以下程序。 int main() { pid_t pid; pid =


请分析以下程序。 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());} 那么,该程序正确运行后的结果是

  • AI am the child process, my process ID is 3744 I am the parent process, my process ID is 3987
  • BI am the child process, my process ID is 3744
  • CI am the parent process, my process ID is 3987
  • D不输出任何信息
参考答案
参考解析:
分类:其他