[Solved] How can I write recursive Strrchr? [closed]
#include <stdio.h> char *StrrchrR(const char *s, int c, char *find){ if(s==NULL) return NULL; if(*s == ‘\0’) return (c == ‘\0’) ? (char*)s : find; return StrrchrR(s + 1, c, *s == c ? (char*)s : find); } char *Strrchr(const char *s, int c){ return StrrchrR(s, c, NULL); } /* char *Strrchr(const char *s, int c){ … Read more