Saturday, October 30, 2010

Introduction to C

What is C??
C is a structured and compiled programming language, which is developed by Dennis Ritchie. C supports rich set of functions that enables easy maintainability of code, by dividing large program into smaller modules.
Positive points about C:
1. C is high-level programming.However C contains features that are normally associated with low-level programming.
2. Speed and memory efficiency is very high.
3. C is a portable programming language.
Portability:executing the program on any sort of Operating system with or with out modifications.
4. C is basis and basic for C++ and Java.

All these features make C as powerful programming language.

Because of its memory efficiency and speed most of the operating systems like linux kernel,windows and games are developed in C.

I hope this introduction is enough to start Learning C programming.

Start programming:

By reading books and listening to lectures you can not C Programming. The best way to learn Programming is by just writing programs.
I Will show you how to write simple C programs, but before hand you must be able to open notepad :D :D.

Now open your notepad and type this

#include
main()
{
printf("Welcome to C Programming\n");
}

Save this file with ".c" extension. like first.c, now your C program is read. This program prints Welcome to C programming on the screen.

To see this Out put first we need to compile the program since C is compiled programming language.

to Compile C program open your terminal and type

>> cc first.c  after compiling the program you will get a.out file if you didn't make any mistakes. Then run a.out file

>> ./a.out
>> Welcome to C Programming.