
Implement a function that compares an int against an unsigned int by their real numeric values and returns -1, 0 or 1.
cmp_mixed(-1, 1u)Expected result
-1For your own tracking. Tests grade your code.
cmp_mixed(5, 5u)Expected result
0cmp_mixed(7, 3u)Expected result
1cmp_mixed(-1, 4294967295u)Expected result
-1cmp_mixed(INT_MIN, 2147483648u)Expected result
-1Expected files
cmp_mixed.cAllowed functions
None. Write every helper yourself.

Implement a function that compares an int against an unsigned int by their real numeric values and returns -1, 0 or 1.
cmp_mixed(-1, 1u)Expected result
-1For your own tracking. Tests grade your code.
cmp_mixed(5, 5u)Expected result
0cmp_mixed(7, 3u)Expected result
1cmp_mixed(-1, 4294967295u)Expected result
-1cmp_mixed(INT_MIN, 2147483648u)Expected result
-1Expected files
cmp_mixed.cAllowed functions
None. Write every helper yourself.

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 →