Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のプログラムの出力は 0 ですが、なぜですか?
#include <stdio.h> #include <conio.h> int main() { int x=5; printf("%d",x!=5); getch(); }
False は として出力され0ます。
0
x!=5は false であるため、%dが出力され0ます。x==51
x!=5
%d
x==5
1
http://codepad.org/t8DAMu3A