Cognizant interview question

What is the difference between generator and alternator?