0

I just want to ask is when we write a a program using any coding language. As we runs the code compiler of each respective language compiles the code.

So my question is when after compilation does the code of every language changes to assembly code and then to the machine code or there is something more that happen there at that time.

Pls Explain it (.|.)

Jarod42
  • 203,559
  • 14
  • 181
  • 302
Vasu saini
  • 21
  • 6
  • Counterexample: https://en.wikipedia.org/wiki/Cfront (C++ compiler outputting C code) –  Dec 09 '21 at 09:46
  • There are plenty of languages that are compiled to bytecode or some other high-level interpretable form, or even interpreted straight from the source. – bereal Dec 09 '21 at 09:55
  • TypeScript is compiled to JavaScript. (maybe transpiled is the more correct term) – super Dec 09 '21 at 10:02
  • Compilers _transform_ one language into another. Be it C language to assembly, C language to machine code, be it German to English. All are compilers. As to `does the code of every language changes to assembly code` No, there are other "executors" of "language", not only machine code, and "compiler" is a broad term. There are interpreters. JVM. And you can transform one language into an interpreter language and run it under interpreter. – KamilCuk Dec 09 '21 at 10:02
  • You said "any coding language"; why are you adding back in the [c++] tag? That narrows the answer *significantly*. (Although that makes it a more exact duplicate for some of the ones I closed this as a dup of; see the links at the top of the page.) – Peter Cordes Dec 09 '21 at 10:08

0 Answers0