All pastes #928848 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-05 10:25 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);
       c2++;
 }
}
char find(char c, char str[]){
    char *ret = str;
    while (*ret++ != c && *ret != '\0'){

    } 
    return *ret;
}