Вы находитесь на странице: 1из 12

How to start coding in c?

tccicomputercoaching.com
tccicomputercoaching.com
tccicomputercoaching.com

 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.


tccicomputercoaching.com

 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.
tccicomputercoaching.com

C Compilers
 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.
tccicomputercoaching.com

 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.
tccicomputercoaching.com
Let us see one simple c language example.
 #include<stdio.h>
 #include<conio.h>
 int main()
{
 printf (“Wel come to TCCI Computer Coaching Institute!”);
 return 0;
}
Output:
 Welcome to TCCI Computer Coaching Institute
tccicomputercoaching.com

 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


tccicomputercoaching.com

 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.


tccicomputercoaching.com

 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.


tccicomputercoaching.com

Call us @ 9825618292

Visit us @ www.tccicomputercoaching.com
tccicomputercoaching.com

Thank you for watching

Вам также может понравиться