Suppose you have a compiler C and an interpreter I Do you ha

Suppose you have a compiler C, and an interpreter I. Do you have verything to run program P on a machine that uses M as its machine language?

(5 points) Suppose you have a compiler L-M a compiler that is in language M and translates from L to M). And suppose C you have an interpreter I n interpreter that is in language L and interprets programs written in language K). Do you have everything you need to run program PR on a machine that uses M as its machine language? If you think you do, provide an argument as to why. If you think you do not provide an argument as to why not and in your argument explain what else you need and why you need it. Your answer should be roughly one paragraph regard ess of your choice and you must use complete sentences for full credit.

Solution

Yes we have everything to run program PK .Interpreter I understands the instructions written in language K and directly executes the program line by line.

But if we want the program to compile first then execute then it will be a problem because we do not have compiler that can convert a program from language K to language M.So we need a compiler which can convert a program from language K to M if we want to convert it to machine code before executing.

Suppose you have a compiler C, and an interpreter I. Do you have verything to run program P on a machine that uses M as its machine language? (5 points) Suppose

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site