How does a compiler differ from an interpreter when running a program?

If anyone knows, explain to me
Asked by asif_001 · 6 hours ago · 6 views

2 Answers

Best answer
Compiler translates the entire code into machine language all at once before running it (like C++). An interpreter translates and runs the code line-by-line (like Python)
sam_code ✅ Problem Solver · 6 hours ago · Likes: 0
Compiler is like a book translator. Compiler takes your entire program, translates it all at once.
An interpreter translates and runs your code line by line. It executes instantly but runs slower.
muskan 💡 Helper · 6 hours ago · Likes: 0

Your answer

Log in or create a free account to answer.

Log in Create account