2
0

strncmp.c 349 B

12345678910111213
  1. #include <string.h>
  2. #include <stdio.h>
  3. #include "test_helpers.h"
  4. int main(void) {
  5. printf("%d\n", strncmp("a", "aa", 2));
  6. printf("%d\n", strncmp("a", "aä", 2));
  7. printf("%d\n", strncmp("\xFF", "\xFE", 2));
  8. printf("%d\n", strncmp("", "\xFF", 1));
  9. printf("%d\n", strncmp("a", "c", 1));
  10. printf("%d\n", strncmp("a", "a", 2));
  11. }