Skip to content

Instantly share code, notes, and snippets.

@JakubOboza
Created July 26, 2012 21:45
Show Gist options
  • Save JakubOboza/3184760 to your computer and use it in GitHub Desktop.
Save JakubOboza/3184760 to your computer and use it in GitHub Desktop.
#osx
λ gcc -o main main.c
λ ./main
-32
32
0
#include<stdio.h>
int main(int argc, char* argv[]){
char* nk = "korea noth";
char* k = "korea";
printf("%i\n", strcmp(k, nk) );
printf("%i\n", strcmp(nk, k) );
printf("%i\n", strcmp(k, k) );
return 0;
}
microsoft WTF ?!
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/crt/strcmp.c.htm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment