if(printf("Hello world")){}
上面代码的输出是
Hello world
我的朋友告诉我,函数printf返回的字符长度在此处非零,因此条件为true。
但是我不明白为什么它要执行该printf语句。不应该仅在内部将printf执行{ }吗?
{ }
c printf if-statement
c ×1
if-statement ×1
printf ×1