fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. char input[] = "home/user/hello.c";
  7. char* output = strrchr(input, '/');
  8. if(output)
  9. puts(output+1);
  10. }
  11.  
Success #stdin #stdout 0s 1832KB
stdin
Standard input is empty
stdout
hello.c