What is a compiled language?

A compiled language is a programming language where the source code is translated into machine code and the machine code is stored in a separate file. A compiled language tends to give the developer more control over hardware aspects like memory management and CPU usage. However, the compiled code is hardware dependent.

In a compiled language, the program needs to be rebuilt whenever you make a change.

Some examples of compiled languages are C, C++, and Haskell.

Advantages

  1. All compiled programs are faster as compared to any interpreted code. This is because the code does not need to be compiled while the program is running.

  2. A compiler gives a list of all the compilation errors during compilation. A programmer can fix the errors and execute the code again.

Disadvantages

  1. The entire code needs to be compiled before testing. This increases the overall run time of execution.

  2. The machine code depends on the platform it is running.

Copyright ©2024 Educative, Inc. All rights reserved