All pastes #928863 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-05 10:50 UTC
rendered paste body
char* find(char c, char *str);

int main(void)
{
 char str[80] = "This is a test string";
 char c = 'e';
 
 char *c2 = find(c, str);
 
 while (*c2++ != '\0'){       
       printf("%c",c2);
 }
 return 0;
}
char* find(char c, char *str){
    char *ret = str;
    while (*ret++ != c && *ret != '\0'){} 
    return ret;
}