answersLogoWhite

0

1. Create the source into a file with any text editor, for example: myprog.c

2. Compile it: gcc -Wall -W -pedantic -g -o myprog myprog.c

3. Run it: ./myprog

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Is there a free service that compiles C programs for Linux?

Linux generally comes installed with the free gcc compiler. MacOSX does too. But when you compile a program with gcc, it runs on the platform under which it was compiled. Therefore, programmers on OSX that need to deliver a Linux binary need to use gcc's cross-compiler mode to produce Linux binaries.


Why cannot you include conioh in your c program when you program in Linux system?

You could, if you had conio.h in linux, but you don't have, that's why.


What is the difference between C and Linux?

There is very little difference in the C compiler between Unix and Linux; in some cases (the gcc compiler) it is the same. The differences come in when using system calls; some system calls do not exist in Unix or Linux, although most do. The program I work on compiles the same way (for the most part) between all commercial versions of Unix and several variants of Linux. In other words, the code is fairly portable across platforms.


What is the difference between compilers and interpreters in c plus plus in tabular form?

C-compiler translates the C-source into Assembly or machine code. On the other hand, C-interpreter -- well, there is no such thing as C-interpreter.


Basic parts of TURBO C program?

Editor - edits text Compiler - compiles the program Linker - links the program Debugger - helps finding bugs


How do you save a c program in Linux?

It depends on the editor.


What is the differentiate of turbo c from turbo c plus plus?

Turbo C compiles c source. turbo c++ compiles c++ source code.


How do you get Linux program error in void main in c?

This question cannot be answered without seeing the source program.


What is the use of compiler?

Compiler is used to convert a language readable in user domain into the tasks which is understood by the machine. example: C++ compiler compiles program written in a langauge understood by user which compiles this to a task which can be executed by a computer's processor.


What is use of compilers?

Compiler is used to convert a language readable in user domain into the tasks which is understood by the machine. example: C++ compiler compiles program written in a langauge understood by user which compiles this to a task which can be executed by a computer's processor.


Why c program runs faster then java program?

The main reason for this is that C code compiles down to native machine code. Java bytecode needs to be run in the JVM, which may or may not compile it down to native code.


Which language is faster java or c plus plus?

C++ compiles to native machine code whereas Java compiles to byte code which must run within the Java Virtual Machine. The extra layer of abstraction means that, comparing like for like, a C++ program will easily outperform its Java equivalent. Thus C++ is easily the faster of the two.