Delta Electronics interview question

Basic problems with C and algorithms