0

I know that code written in C is usually compiled and executed, but can it be interpreted and executed?

Shiina
  • 1
  • 1
  • I’m not going to answer this directly, as I feel you’ll benefit more by having a re-think (or do some research) about *why* C code is compiled, and what interpretation does. – S3DEV Jan 14 '22 at 12:50
  • 2
    Everything is possible. `can it be` Yes, it _can_. I do believe it's possible to write an interpreter. Try writing one - it could be a fun project tin C. Explore existing ones https://stackoverflow.com/questions/584714/is-there-an-interpreter-for-c . – KamilCuk Jan 14 '22 at 12:51
  • If this is not (as it seems to be) an interesting but purely theoretical question, then I guess we are looking at a https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem . If you need more of an answer than "Yes" you better ask how else to achieve what you intend to achieve by using a C interpreter. – Yunnosch Jan 14 '22 at 12:55
  • Conversely, interpreted language code can be compiled, and is. – Weather Vane Jan 14 '22 at 12:59
  • Thank you for your answers, I will reconsider. – Shiina Jan 14 '22 at 13:03

0 Answers0