FreePrograms

  CONTACT US   ABOUT US   PRIVACY  DISCLAIMER

FREE C PROGRAMS:

Get all Free C language Programs here!!

C language is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. C language is a middle level language.

What is C C vs C++ vs Java Program Structure Data Types in C Basic Rules of C & C++
Functions in C If, Else Conditions Loops in C Switch Case Arrays
Pointers Structures in C Strings in C Command Line Arguments Type Casting
Linked Lists Recursion Binary Trees Inheritance Multiple Inheritance
Templates File I/O Object Oriented Programming Data Structures in C C interview Questions

C Programming for beginners : How to get started with C Language

Here we will teach how you can start and make your first C program. C language is middle level language`. To run a C program you need to have a C Compiler. Compiler is used to interpret our syntax (our program) into the machine code so that machine can understand our code.

When we save the program an exe file along with Obj file is made. OBJ file is the machine code. You can easily download a Borland C compiler through internet. Log onto www.borland.com otherwise try searching on Google. After downloading its latest version, install c language on your system. DOWNLOAD COMPILER HERE

After installing it you will find under TC folder - BGI | BIN | INCLUDE | LIB folders.

Here we will only consider the BIN folder and the INCLUDE Folder for the moment.

BIN folder contains TC.EXE. Execute this file then you will see something like we see below.

Note: All code written in c language is written in lower case letters

Go to File menu and click new as shown below

This is what you will see after clicking on new. (a blue colored screen or text writing screen, this is the place where you will write your first c program).

By default the page opens as NONAME00.CPP

rename the file and save it by your name with extension as 'c' e.g name.c as shown below

Now write this code as shown below in your TC. This c program on compilation will print your name. For compiling this c program press ALT-F9.

The output on compilation will print this as follows

This is your first c program which prints your name.

Similarly to we can make a addition program.

(//-it is used for comments just to make you understand, every statement is terminated by; leaving the header files and functions)


ADD.C

**********************************************************************************

//C PROGRAM TO ADD TWO PRE DEFINED NUMBERS:

#include<stdio.h>       //header files in C found in INCLUDE directory

#include<conio.h>       //header files in C found in INCLUDE directory

void main()             //main function starts here

{

            int a,b,c;   //variables declaration

            clrscr();    //clears output screen

            a=5;b=10;    //variables values

             c=a+b;      //addition of a and b gone to c

            printf("%d",c);//printing c to output screen

            getch();       //to hold the screen

}

FREE C PROGRAMS : Get all Free C language Source code, Programs here!!  

 

© COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM