answersLogoWhite

0

if it is n already compiled binary program:

./program-name

if it is a code,

gcc program-code.c -o program-name

if gcc is not installed,

on debian: search for a deb package and install it, or,

apt-get install gcc

on redhat: search for an rpm package and install it.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

How do you run a C program in Linux?

All binaries are launched by simply typing the name of the application.


Can you install C language in Linux?

C isn't a program, or something you install; it is a programming language for writing software. Linux and most of the programs that run on it were written in C, and a C compiler and libraries are supplied with most systems, or are readily available.


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.


How do you save a c program in Linux?

It depends on the editor.


How do you convert C source code into a screensaver for Linux?

Most screensavers on Linux are modules run by Xscreensaver: http://en.wikipedia.org/wiki/XScreenSaver I don't know exactly how to convert a program to a module, check the Xscreensaver documentation.


Can a C or CPP program compiled on Linux run on Windows and vice versa assuming that both the OSs are loaded in and can run on the same machine?

No. Windows and Linux have different APIs and ABIs for programs to access. You cannot run Linux binaries on Windows, and you can only run Windows binaries on Linux if you have Wine installed.


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

This question cannot be answered without seeing the source program.


Can you run programs compiled with Turbo C on Linux?

Turbo C cannot compile native Linux binaries, only programs for MS-DOS. MS-DOS applications can be run on Linux through a variety of methods, including DOSEMU, DOSBox, QEMU, Bochs, and VirtualBox.


How do you write a C program in Linux?

1. Create your source-file with any text-editor (mcedit myprogram.c, for example).2. Compile it: gcc -g -Wall -W -pedantic -o myprogram myprogram.c3. Fix the errors and warnings, if any4. Run your program: ./myprogram(Note: you should not use linux-9.0 yet, as only linux-2.6.x released).


What Services are needed to program in Linux?

To program in linux, you just have to pick out a programming language, and use your favorite text editor or IDE to start programming. Most prodominantly, programs are written in C or C++ and can be compiled with the Gnu C Compiler (gcc) or g++ if your program is in an interpreted language, such as perl or python, you just have to make sure you have the interpreter installed.


How do you compile a C program in Linux?

1. Create the source into a file with any text editor, for example: myprog.c2. Compile it: gcc -Wall -W -pedantic -g -o myprog myprog.c3. Run it: ./myprog


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.