The Command Prompt window
In this article, we show you how to compile and run your C program. We assume that the Tiny C compiler has been installed in
and your program is stored in a file AreaOfSquare.c in the folder C:\CPrograms.
We will run our programs using the “Command Prompt" window. This is also called the MS-DOS window.
Open the window by clicking on Start > All Programs > Accessories > Command Prompt
At the command prompt >, type
The window should now look as follows (your first lines may be slightly different): This changes the current directory to the folder (C:\CPrograms) containing your program, AreaOfSquare.c.
To compile the program, we would like to type
where tcc.exe is the file containing the compiler.
However, if we did this, we would get a message to the effect that tcc is unknown.
The file tcc.exe is found in the folder, C:\TinyC.
C:\ TinyC is called the “path" to the compiler. We must tell Windows where to find the compiler by setting the Path “environment variable."