Cognizant interview question

asked on c programming, oops and MySQL