Nokia interview question

puzzle, bit programs in c