Cognizant interview question

difference between compiler and interpreter