Dec 17, 2011

How to run c program






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