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.
Mine has always been to postulate a singly-linked list with each node
containing a string value, then ask them to write something to print out
the list in reverse order. There's a bunch of obvious ways to solve
that problem; the nice thing about it is that depending on the answer
that they give you can apply more constraints (copying isn't allowed,
memory is constrained, optimize for speed, whatever) in order to better
estimate their approach to solving problems.
--
Chris Kennedy
chris at
mainecoon.com AF6AP
http://www.mainecoon.com PGP KeyID 108DAB97
PGP fingerprint: 4E99 10B6 7253 B048 6685 6CBC 55E1 20A3 108D AB97
"Mr. McKittrick, after careful consideration..."