#include<stdio.h>
int main()
{
int x=0x00;
int y=0x0a;
printf("x = %d",!!x);
printf("y = %d",!!y);
}
Result:
x = 0y = 1
Reference:
#include<stdio.h>
int main()
{
int x=0x00;
int y=0x0a;
printf("x = %d",!!x);
printf("y = %d",!!y);
}
x = 0y = 1
0 意見:
張貼留言