Someone
public text v1 · immutablechar *mystrchr(const char *s, int c)
{
while (*s != '\0')
{
if (*s == c)
return (char *)s;
++s;
}
}
int main(int argc, char **argv)
{
char *pos;
char string[] = "This is a test";
pos = mystrchr(string, 'h');
printf("%x\n", pos);
return 0;
}