How to run c program




How to compile and run c programming language code in different compilers

To compile and run a program may vary according to complier and IDE.

Turbo c++ 4.5
To compile: ALT + F9 or go to Project -> Compile
To run: CTRL + F9 or go to Debug -> Run

Turbo c++ 3.0
To compile: ALT + F9 or go to Compile -> Compile
To run: CTRL + F9 or go to Run -> Run  

Suppose name of c file is demo.c
Linux gcc:
To compile: gcc demo.c
To run: ./a.out

Visual c++:
Open the Visual Studio Command Prompt
To compile: cpp demo.c  
To run: demo

If you have any problem in to run a c program you can ask here.


Post a Comment