Nokia interview question

Simple bit manipulation and arrays