One of the tough things about interviewing potential employees is how to find out if someone really knows how to program. I have lost track of how many times I've been asked to write a function to reverse a string. Such tests are OK for entry level programmers, but for senior level programmers I'm not so interested in knowing if they know stuff that they can look up in K&R. When it comes down to it, the actual coding is probably the least important part of a software engineers job. After an interview with a quiz that would have made a decent midterm for a class in C, I started work on one that would test someone at a higher level. This is a bit harder in that what you are looking at isn't so much what the person answers as how they solve the problem.

Pseudo code is acceptable for any programming answers, I'll assume that between a compiler and a language reference, you can write a program that will compile legally.

1) Your CPU has the following math functions:

Integer: (32 bit)
Add, change sign, shift, and, or, xor, not, set bit, clear bit, load

Float:(8 bit exponent, 24 bit mantissa)
Integer to float, float to integer, add, subtract, multiply, divide

Write a very fast routine that will give a rough approximation of LOG.

2) Using only integer math, write a routine that will output a running average (IIR filter) of a 16 bit input.

3) What is the difference between a Peer review and a formal inspection.

4) Write a checksum routine.

5) Write an example of a function header.

6) How long would it take to write a control program to frob the twiddlies on a framminstaff? Defend your estimate.

Last Updated 9/16/98