C语言中!!的作用是?看例子;
1 #include <stdio.h> 2 3 int main() 4 { 5 int test = 666; 6 7 printf("test=%d !test=%d !!test=%d\n", test, !test, !!test); 8 9 return 0; 10 }
output
test=666 !test=0 !!test=1
【推荐】100%开源!大型工业跨平台软件C++源码提供,建模,组态!
【推荐】AI 的力量,开发者的翅膀:欢迎使用 AI 原生开发工具 TRAE
【推荐】2025 HarmonyOS 鸿蒙创新赛正式启动,百万大奖等你挑战