C语言中!!的作用是?看例子;
1 #include <stdio.h> 2 3 int main() 4 { 5 int test = 666; 6 7 printf("test=%d !test=%d !!test=%d ", test, !test, !!test); 8 9 return 0; 10 }
output
test=666 !test=0 !!test=1
C语言中!!的作用是?看例子;
1 #include <stdio.h> 2 3 int main() 4 { 5 int test = 666; 6 7 printf("test=%d !test=%d !!test=%d ", test, !test, !!test); 8 9 return 0; 10 }
output
test=666 !test=0 !!test=1