and.c
来自「linux下的C语言开发」· C语言 代码 · 共 24 行
C
24 行
#include <stdio.h>int main(){ int i1, i2; /* two random integers */ i1 = 4; i2 = 2; /* Nice way of writing the conditional */ if ((i1 != 0) && (i2 != 0)) printf("Both are not zero\n"); /* Shorthand way of doing the same thing */ /* Correct C code, but rotten style */ if (i1 && i2) printf("Both are not zero\n"); /* Incorrect use of bitwise and resulting in an error */ if (i1 & i2) printf("Both are not zero\n"); return (0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?