fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. const char *haystack = "foo";
  6. const char *needle = "";
  7. printf("%d\n", strstr(haystack, needle) - haystack);
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0s 5556KB
stdin
Standard input is empty
stdout
0