Created
July 18, 2017 07:03
-
-
Save kaityo256/24f78a0c8e9565c4ae95e14f8c5a3d0a to your computer and use it in GitHub Desktop.
Operations to boolean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int | |
| main(void){ | |
| bool t = true; | |
| printf("%d\n",t << 1); //=> 2 | |
| printf("%d\n",++t); //=> 1 | |
| printf("%d\n",t); //=> 1 | |
| int i = 1; | |
| printf("%d\n",i << 1); //=> 2 | |
| printf("%d\n",++i); //=> 2 | |
| printf("%d\n",i); //=> 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment