Monday, September 7, 2009

How to run C program on windows

(a) Take the Visual Studio 2005 command prompt as follows;

Start -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools ->
-> Visual Studio 2005 Command Prompt

(b) Create a new C Program file called first.c
>notepad first.c

(c) Type the following program in the file first.c .

void main()
printf(“Hello World \n“);

Note : \n is for newline character

(d) Save and close first.c

(e) Go to the command prompt and compile the program
>cl first.c

(f) If you don’t get any errors run the program

No comments:
Write comments
Recommended Posts × +