answersLogoWhite

0


Best Answer

Programming Languages are a form of comunication between a programmer and the hardware. So the code written in C has to be compiled/transformed into machine code (similar to Assembler) so that the hardware can understand what to do. Compilation leaves your code ready to excecute. Withought it you only have the recipe of what the program does.

User Avatar

Wiki User

βˆ™ 13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 15y ago

Because source code can not be executed directly, first you have to produce an executable program from it. That's what you call compilation.

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 13y ago

You don't have to, only if you want to execute your programs.

This answer is:
User Avatar

User Avatar

Wiki User

βˆ™ 12y ago

Only if you want to get an executable program.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why we have to compile a c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How a c program execute?

Compile and link it into an executable.


How do you use c program?

Compile, link and execute them.


How is C program portable?

Your program is portable if you can compile and execute it on different platforms.


How do you compile a c program in windows OS?

First, install a C-compiler.


What is the difference between make and compile in c?

make is a utility program, compile means translation from source to object module.


How is a C program rum?

C-source program doesn't rum, you have to compile and link it. The executable rums like any other binary program.


Can visual basic compile a c plus plus program?

As much as your car can fly.


Can you give a sentence with the word compile?

I had to compile a list of all the people who had seen the accident. Take these reports and compile a history starting with the oldest dates first. The doctor asked me to compile my medical history.


Does C plus plus compiler will compile C in programming?

Yes we can compile a c program using c++ compiler. Because c++ evolved from the c. c++ have some additional features beyond c. c++ support almost all concepts used in c.


Can you have two mains in a c program?

No you can't. main() is the entry point of a C program where execution starts. Only a single main() can exist in a C program. A program with 2 mains wil not even compile successfully.


How many compilers are there to compile a C program?

There are many C compilers. In modern usage, the most common ones are Microsoft Visual C++ (which can also compile C programs) and GCC (GNU Compiler Collecttion, originally GNU C Compiler).


Programming process of c language?

Write the source program. Compile. Link executable. Run it.