Created
July 26, 2012 21:45
-
-
Save JakubOboza/3184760 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
#osx | |
λ gcc -o main main.c | |
λ ./main | |
-32 | |
32 | |
0 |
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(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; | |
} |
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
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