Q7. How is a compiler different from interpreter?
Ans. A compiler converts the source code (program in HLL) into object code (Machine Language code) in one go and reports all the errors along with their line numbers.
An interpreter converts source code into object code line by line and executes it there and then. It does not shift to the next line if line is erroneous.