我经历了这个问题 -
为什么结果:1 ? (int *)0 : (void *)0 与以下结果不同: 1 ? (int *)0 : (void *)1
1 ? (int *)0 : (void *)0
1 ? (int *)0 : (void *)1
它有何不同?它应该是0或(int*)0. 如何查看结果? 我们可以在哪里使用这种表达方式?
0
(int*)0
c ternary-operator type-conversion void-pointers
c ×1
ternary-operator ×1
type-conversion ×1
void-pointers ×1