2 ms·
As an interviewer, the real value in this question is to get the attitude of the person behind it. The best candidates know it because they've read widely and
by RiderOfGiraffes 16y ago
As an interviewer, the real value in this question is to get the attitude of the person behind it. The best candidates know it because they've read widely and know the tricks. They also then add "But I wouldn't use it."
The very best candidates add: Because it's tricky, hard to read, limited in scope, and usually you can avoid swapping variables by changing their usage downstream. Besides, the best compilers will sort it out for you if you write it clearly and cleanly.
When I interview it's not the answers I listen to, it's the knowledge they expose, not of programming per se, but of good practices in programming.