fork(2) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char str[] = "quick.brown.fox";
  6. char *ptr = strrchr(str, '.');
  7. if (ptr) {
  8. *ptr = '\0';
  9. }
  10. printf("%s\n", str);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
quick.brown