C is a programming language originally developed for developing the UNIX operating system. It is a low-level and powerful language.
To start coding in c, first you should install Turbo C.
Install Turbo C++:
Download Turbo c++ for window.
Step 1: Locate the TC.exe file and open it. You will find it at location C:\TC\BIN\.
Step 2: File > New (as shown in above picture) and then write your C program.
All the C programs are written into text files with extension “.c” for example Welcome.c.
When you write any program in C language then to run that program you need to compile that program using a C Compiler which converts your program into a language understandable by a computer. This is called machine language (i.e. binary format). So before proceeding, make sure you have C Compiler available at your computer. It comes along with all flavours of UNIX and Linux.
You can ask your system administrator or you can take help from anyone to identify an available C Compiler at your computer.
If you don’t have C compiler installed at your computer then you can use below given link to download a GNU C Compiler and use it.
If you are working over UNIX or Linux then you can type gcc -v or cc -v and check the result. Then you have to write coding in VI editor.
Let us see one simple c language example.
printf (“Wel come to TCCI Computer Coaching Institute!”);
Welcome to TCCI Computer Coaching Institute
Step 3: Save the program using F2 (OR file > Save), in the below screenshot I have given the name as Welcome.C. Always extension should be .c when saving programme.
Step 4: Compile the program using Alt + F9 OR Compile > Compile
Step 5: Press Ctrl + F9 to Run (or select Run > Run the C program.
Compile and Run C program using gcc compiler
We can also do the same using gcc compiler.
Following are the steps for that.
Step1: Prepare Source code Welcome.c (file saved with .c extension)
Step 2: Compile the source code.
>gccWelcome.c –o Welcome
Step 3: Run the compiled program.
Once you give the above command a .exe file would have been created.
If you like this post then please like this and share this post.
TCCI teach Online C Programming Language to all school students , college students and any person.
Call us @ 9825618292
Visit us @ http://www.tccicomputercoaching.com