Allied Testing interview question

In programming skills part I was asked to write a function calculating n! to demonstrate recursion.