answersLogoWhite

0


Best Answer

Any computer program does not need compiler at the time of execution. Compiler is needed to convert a high-level language program into an intermediate machine code. When you run a program, the executable binary runs, and that is what you get after compilation, etc. Summary: your Q is incorrect. Please read about compiler, and linker to understand the concept. You cannot write c or c++ code and run it without a compiler. a compiler translates a high level language (c, c++, java) into basic computer code (binary) which is composed of 1's and 0's (101001111001). but you can run it without a compiler if it has already been turned into an executable or an application by another computer.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Example for DOS:

COPY CON: PROGRAM.C

/* program.c */

#include <stdio.h>

int main (void) { puts ("Hello, World"); return 0; }

^Z

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a C program which runs independent of the compiler No need to install the compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is compiler is platform independent?

No. (Of course you should specify what compiler you are talking about.)


What is the difference between a compiler and a text editor?

An editor is just a program in which you write and edit the program. The compiler is used to compile the program, i.e., convert the program to machine understandable code. A development environment often combines the both into an intelligent application called the IDE or Integrated Development Environment.


Why is it important to know the proper data types in declaring variables?

If you do not know then you cannot write a program. The compiler is not clairvoyant so it cannot do it for you.


What are the purpose of compilers?

When writing a program, you write it in a certain language (java, C++, VB.NET etc.). For the computer to understand that, you need to convert it to computer language. That is what the compiler does.


What is the relationship between compiler interpreter loader and linker?

Compiler - Translates High level language (C, C++ etc.) and generates Object code (machine readable but not directly executable)Interpreter - Same as compiler but do that interactively (simply saying line by line). Interpreted languages don't usually require a linker, and employ a loading process different from that of a compiled program: the interpreter itself is linked and loaded like a compiled program (and in all probability is a compiled program), but the program interpreted by the interpreter is typically loaded through interpreter-specific means.Linker - Connects the compiler generated object code with library code to generated independent executable (like in C, you dont write how printf() works, linker add the code for printf() function in your program)Loader - Load the machine readable codes in memory to be executed. This step typically includes relocating the code output by the linker to a specific memory location into which the program was being loaded.

Related questions

Is compiler is platform independent?

No. (Of course you should specify what compiler you are talking about.)


Why c compiler creates exe file?

(Actually, it is the linker, not the compiler.) In most cases, when you write a program, it's not only for your own pleasure, but you actually want to run the program. Well, the runnable format of the program is the exe(cutable).


Where you can write c program?

Your own room should be suitable. Also, you might need a compiler.


Are languages and compilers application softwares?

No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.No. A compiler is a system software. An application can be created using a language and a compiler. A language is what you write the software with.


What is the difference between a compiler and a text editor?

An editor is just a program in which you write and edit the program. The compiler is used to compile the program, i.e., convert the program to machine understandable code. A development environment often combines the both into an intelligent application called the IDE or Integrated Development Environment.


How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


Why is it important to know the proper data types in declaring variables?

If you do not know then you cannot write a program. The compiler is not clairvoyant so it cannot do it for you.


How do you change source code into machine code?

A program called a compiler, or sometimes an assembler (depending on the programming language) does this for you. You write the source code, then invoke the program that will convert this into machine language.


Can you write a program without specifying the prototype of any function?

You can write a program without specifying its prototype when the function returns an integer.If the prototype is not mentioned the compiler thinks that the return type of the function used is integer.When making program which return integer you can ignore writing the protoype.


What are the purpose of compilers?

When writing a program, you write it in a certain language (java, C++, VB.NET etc.). For the computer to understand that, you need to convert it to computer language. That is what the compiler does.


Why would a program be written in assembly language instead of basic language?

To allow use of special instructions that the HLL compiler/interpreter cannot generate. These are often special I/O or multiprocessor synchronization instructions unique to this processor architecture.To produce timing or space critical code.To write the bootstrap program.To write a program for a new custom processor for which no HLL compiler/interpreter has been written, yet. This might be the first development version of that first HLL compiler/interpreter.etc.


What is the relationship between compiler interpreter loader and linker?

Compiler - Translates High level language (C, C++ etc.) and generates Object code (machine readable but not directly executable)Interpreter - Same as compiler but do that interactively (simply saying line by line). Interpreted languages don't usually require a linker, and employ a loading process different from that of a compiled program: the interpreter itself is linked and loaded like a compiled program (and in all probability is a compiled program), but the program interpreted by the interpreter is typically loaded through interpreter-specific means.Linker - Connects the compiler generated object code with library code to generated independent executable (like in C, you dont write how printf() works, linker add the code for printf() function in your program)Loader - Load the machine readable codes in memory to be executed. This step typically includes relocating the code output by the linker to a specific memory location into which the program was being loaded.