
Implement gm_strrchr, your own strrchr, which scans a string for the last occurrence of a character and returns a pointer to it.
gm_strrchr("merge merge", 'e')Expected result
eFor your own tracking. Tests grade your code.
gm_strrchr("git status", 'z')Expected result
(null)gm_strrchr("commit", '\0')Expected result
(empty result)
Expected files
strrchr.cAllowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement gm_strrchr, your own strrchr, which scans a string for the last occurrence of a character and returns a pointer to it.
gm_strrchr("merge merge", 'e')Expected result
eFor your own tracking. Tests grade your code.
gm_strrchr("git status", 'z')Expected result
(null)gm_strrchr("commit", '\0')Expected result
(empty result)
Expected files
strrchr.cAllowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.