fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. char s1[20] = "2898";
  7. char s2[20] = "8597";
  8.  
  9. printf("result = %d\n", strncmp(s1, s2, 4));
  10.  
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 10304KB
stdin
Standard input is empty
stdout
result = -6