c - 帮助 C 程序中的 if-else

标签 c

<分区>

Possible Duplicate:
What’s the “condition” in C interview question?

void main()
{
         if(CONDITION)
               printf("Hello ");
         else
               printf("World");
}

将 CONDITION 替换为执行两个 printf 语句的条件。 main() 中不能有循环或其他东西 我在网上找到了这段代码,我试图思考它背后的逻辑,但我不能。 请帮帮我 谢谢

最佳答案

 if(fork() == 0)
    ...

关于c - 帮助 C 程序中的 if-else,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3472196/

相关文章:

c - C 中指向单链表指针的指针

java - 如何拦截用户与 UI 交互产生的 motionEvents 和 keyEvents

c - 如何在 C 中对 dirent 进行 qsort

c++ - 当进程在 linux 下结束时如何得到通知?

c - 命名管道客户端和服务器,消息在服务器上被截断?

c - 嵌入式 C : what does var = 0xFF; do?

c - 如何读取 12 位的 i2c lis3dh 寄存器值?

c - MapViewOfFile-OpenFileMapping(需要帮助)

c - 如果指向标准输入,是什么让 fgets() 实际上等待用户输入?

c - 从命令行读取和连接房间