PwC interview question

Basic programming questions have been asked