Created
January 6, 2019 16:17
-
-
Save denysvitali/343e3697c7bfcc2381b4583ee65ddb22 to your computer and use it in GitHub Desktop.
This file contains 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(){ | |
int i = 0; | |
int a = 23; | |
int b = 3; | |
i += a; | |
i = i << 5; | |
i += b; | |
printf("%d\n", i); | |
int c = i & 0x1F; // == b | |
int d = i >> 5; | |
if(c != b){ printf("Errore\n"); } | |
if(a != d){ printf("Errore 2\n"); } | |
printf("%d - %d", c, d); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment