In a certain code, 'MANGO' is written as 'NBNHP'. How is 'APPLE' written in that code?

Answer: A. BQQMF
Each letter in 'MANGO' is shifted forward by one position and then the last letter is replaced with the next letter in the alphabet. Applying the same rule to 'APPLE' gives 'BQQMF'.