fork(1) download
  1. #include <stdio.h>
  2.  
  3. char *f (char s[], char t[], char out[]);
  4. int main(void)
  5. {
  6. char s[] = "ISBN-978-8884981431";
  7. char t[] = "ISBN-978-8863720181";
  8. char out[10];
  9. printf ("%s\n", f(s,t,out));
  10. return 0;
  11. }
  12. char *f (char s[], char t[], char out[]) {
  13. char *orig = out;
  14. for ( ; *s == *t ; s++, t++)
  15. *out++ = *s;
  16. *out = '\0';
  17. return orig;
  18. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
ISBN-978-88