pointers-memory · beginner · ~15 min
Return a pointer into a string.
Implement const char *find_char(const char *s, char c) returning a pointer to the first occurrence of c in s, or NULL if absent (like strchr).
#include <stddef.h>
const char *find_char(const char *s, char c) {
/* TODO */
return NULL;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.