How2Lab Logo
tech guide & how tos..

ANSI C Compiler

To be able to test all the program source codes provided in this section, you will require an ANSI-C Compiler. In case you do not already have a C compiler installed in your computer, you may download one from the below link.

Please note that the compiler provided here will work only on windows operating system.

Download the compiler in any suitable directory in your computer and unzip the file. The zipped folder will expand to a bunch of directories and files with the top most parent directory named c. You may move the entire c directory under your root directory. If your root directory is C:\>, then after the move, you will have your c compiler under C:\>c\.

To keep things simple, keep all your c source codes, viz. files with .c extension, under this directory itself.

Now open an MS-DOS window and change directory to c\.

Compiling & Running C program under Windows

  • All C programs must have .c extension. Remember, this extension is always in lowercase.
  • You may write your C program using any text editor, such as notepad.
  • Run your program with the following command: C:\>tcc prog.c
  • Now, view the directory contents, using the command: C:\>dir
  • You will see a new file by the name prog.exe, if your c program compiled without errors. This is the executable version.
  • Invoke the executable program with the command: C:\>prog

The diagram below shows the entire compilation process:

Buy Domain & Hosting from a trusted company
Web Services Worldwide | Hostinger
About the Author
Rajeev Kumar
CEO, Computer Solutions
Jamshedpur, India

Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.

Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.

Refer a friendSitemapDisclaimerPrivacy
Copyright © All rights reserved.