Mercury Systems Interview Question

Write a c program that does the opposite of atoi.

Interview Answer

Anonymous

Aug 19, 2017

Used modulo to take the digits into an array of digits, then converted them to a similar array of characters using them as an offset to the character '0'. Ex. 123 -> [1,2,3] -> ['1','2','3']