Last active
March 10, 2017 08:40
-
-
Save hymkor/5e6a4dd8212d61ce3d4c2c94f46642ed to your computer and use it in GitHub Desktop.
strlen の戻り値は size_t (unsigned)
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
$ cat foo.c | |
#include <stdio.h> | |
#include <string.h> | |
int main() | |
{ | |
int zero=0; | |
puts( zero > strlen("")-1 ? "true" : "false"); | |
return 0; | |
} | |
$ ./a.out | |
false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment