
Implement gm_strcmp, your own strcmp, which compares two null-terminated strings byte by byte and returns an integer reflecting their lexicographic relationship.
gm_strcmp("hello", "hello")Expected result
0For your own tracking. Tests grade your code.
gm_strcmp("merge conflict on line one", "merge conflict on line two")Expected result
negative valueExpected files
strcmp.cAllowed functions
None. Write every helper yourself.
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_strcmp, your own strcmp, which compares two null-terminated strings byte by byte and returns an integer reflecting their lexicographic relationship.
gm_strcmp("hello", "hello")Expected result
0For your own tracking. Tests grade your code.
gm_strcmp("merge conflict on line one", "merge conflict on line two")Expected result
negative valueExpected files
strcmp.cAllowed functions
None. Write every helper yourself.
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.