单选题 1分

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

请分析以下程序。
int main()
{
pid_t pid;
pid = fork();
if(pid==0)
printf("I am the child process, my process ID is%d\n",getpid());
else
printf("I am the parent process, my process ID is%d\n",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. 不输出任何信息

你可能感兴趣的试题

1 单选题 1分
  • A. 并发性
  • B. 顺序性
  • C. 封闭性
  • D. 并行性
2 单选题 1分
  • A. 文件管理
  • B. P、V操作管理
  • C. 死锁管理
  • D. 备份管理
3 单选题 1分
  • A. 进程调度程序
  • B. 中断服务程序
  • C. 设备驱动程序
  • D. 用户应用程序
4 单选题 1分
  • A. 系统调用
  • B. 命令控制语言
  • C. 作业控制语言
  • D. 应用编程接口
5 单选题 1分
  • A. 访管指令
  • B. I/O指令
  • C. 页保护指令
  • D. 压栈指令