NTT DATA interview question

what is virtual function, write a code of virtual function, how it works