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

对于如下C语言程序 int main() { pid_t pid; int


对于如下C语言程序 int main() { pid_t pid; int x=1; pid = fork(); if(pid==0) printf("I am the child process, x=%d ", ++x); else printf("I am the parent process, x=%d ", --x); } 在UNIX操作系统中正确编译链接后,其正确的运行结果是

  • AI am the child process, x=2
  • BI am the parent process, x=0
  • CI am the parent process, x=2
  • DI am the child process, x=0
参考答案
参考解析:
分类:其他