Created
May 12, 2013 00:12
-
-
Save sgielen/5561885 to your computer and use it in GitHub Desktop.
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
sjors@foo:/tmp$ cat main.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
long bar = strtol(argv[1], NULL, 10); | |
printf("bar = %ld\n", bar); | |
int foo = 5 / bar; | |
printf("I'm still here\n"); | |
return 0; | |
} | |
sjors@foo:/tmp$ ./main 0 | |
bar = 0 | |
Drijvendekomma-berekeningsfout | |
sjors@foo:/tmp$ export LANG=C | |
sjors@foo:/tmp$ ./main 0 | |
bar = 0 | |
Floating point exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment