Ian King wrote:
I used to ask college grads to write a function in C
to convert a
null-terminated string representing an octal number into an int.
Do you mean that the octal digits are packed one per 3 bits, or that each item
in the string matches to one of the chars '0'..'7'?
(I think I've seen the latter problem somewhere else - can't recall if it was
an interview or some form of test, though, or even what language was expected
to be used)