Hey guys I'm new here, I have a problem with this function, can anyone tell me what's wrong?
Code:int rec (char *s, char c); int main() { char s[10]="abra"; char c='a'; printf ("%c appeared %d times\n",c,rec(s,c)); return 0; } int rec (char *s, char c) { if (*s=='\0') return; if (c==*s) { return (1 + rec(s+1,c)); } else { return rec(s+1,c); } }