Infosys interview question

Write a simple v code and explain it.