What's the “condition” in C interview test?

后端 未结 30 2900
旧时难觅i
旧时难觅i 2020-12-05 02:37

Would it be possible to print Hello twice using single condition?

if  \"condition\"
  printf (\"Hello\");
else
  printf(\"World\");         


        
30条回答
  •  鱼传尺愫
    2020-12-05 03:17

    Dont use an if else block then.

    EDIT to Comment.

    It might then mean that the code be in both blocks, or before/after the block if it is required to run in both cases.

提交回复
热议问题