Updated the interview question in c