Interview Questions

I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

C Interview Questions and Answers


(Continued from previous question...)

I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

See if you can run lint first (perhaps with the -a, -c, -h, -p or other options ). Many C compilers are really only half-compilers, taking the attitude that it's not their problem if you didn't say what you meant, or if what you said is virtually guaranteed not to work. (But do also see if your compiler has extra warning levels which can be optionally requested.)

(Continued on next question...)

Other Interview Questions