Mystifly interview question

Basic programming questions which you can crack easily and one program which you can write the code easily once after thinking for 5 minutes.