Amar Ujala interview question

Basic programming questions with average level of difficulty