
Implement gm_atoi, your own atoi, which reads a numeric value from a string, skipping any leading whitespace and handling an optional sign.
gm_atoi(" +7")Expected result
7For your own tracking. Tests grade your code.
gm_atoi("-300px")Expected result
-300gm_atoi("nope")Expected result
0Expected files
atoi.cAllowed functions
None. Write every helper yourself.
Standard C library
Implements the contract of a function from the standard C library.

Implement gm_atoi, your own atoi, which reads a numeric value from a string, skipping any leading whitespace and handling an optional sign.
gm_atoi(" +7")Expected result
7For your own tracking. Tests grade your code.
gm_atoi("-300px")Expected result
-300gm_atoi("nope")Expected result
0Expected files
atoi.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.
v0.40: Create exercises. Challenge the community.
Meet Studio →