함수 strcmp()

1 C[ | ]

printf("%d\n", strcmp("aa", "aa"));
printf("%d\n", strcmp("aa", "bb"));
printf("%d\n", strcmp("bb", "aa"));
// 0
// -1
// 1
printf("%d\n", strcmp("hello", "hello"));
printf("%d\n", strcmp("hello", "world"));
printf("%d\n", strcmp("world", "hello"));
// 0
// -1
// 1

2 PHP[ | ]

echo strcmp("aa","aa").PHP_EOL;
echo strcmp("aa","bb").PHP_EOL;
echo strcmp("bb","aa").PHP_EOL;
# 0
# -1
# 1
echo strcmp("hello","hello").PHP_EOL;
echo strcmp("hello","world").PHP_EOL;
echo strcmp("world","hello").PHP_EOL;
# 0
# -15
# 15

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}