Created
February 25, 2015 17:15
-
-
Save ryands/8549699062e7057bf66a to your computer and use it in GitHub Desktop.
demonstrating casting and overflow (trivial)
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
/* gcc -o cast cast.c */ | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
unsigned long sides; | |
int input = -5; | |
sides = input; | |
printf("Catas input %lu\n", sides); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment