Microsoft interview question

“Write a one-line C expression to determine if a number is a power of 2”. Microsoft is famous for asking such questions to their programmers. Or you might want to find out what the assembly code

CWD
XOR AX, DX
SUB AX, DX

does. Satish’s site has the answer, but not the question. More questions: 1 2

Leave a Comment

Your email address will not be published. Required fields are marked *