Tuesday, December 8, 2015

Introduction to C Language


C is one of the most popular computer language developed at AT&T’S Bell laboratories of USA in 1972 .It was developed by Dennis Ritchie. It is also called mid level language.
Today when the computer technology is on it's highest era and the advance programming languages like C++,C# and JAVA is very popular among developers many of us may think that C is now become less important. But this is not true since, C is still very popular and important language for it's following features.

Advantage Associated with C Language

  1. Simple to use and understand. You can later on migrate to C++, C# or java. Hence, preferring two-step learning process.
  2. C++,C# or java using oops technology that actually require core C language element.
  3. Operating system like window, Linux, UNIX is still written in C. And so if you are to extend any of above operating system to work with new devices you must need to write device driver program. And are exclusively written in C.
  4. C has best performance record. Because of highest execution among all other language (due to its verity of data type and powerful operator).
  5. Enormous electronic gadgets like mobile phone, digital camera, I-pod, microwaves, ovens, washing machine are using a microprocessor (chip) which contains an operating system and a program which are embedded in these devices which must have fast execution within limited amount of memory. And it is C who comes to show its smartness here.
  6. Professional 3D computer game like spaceship and firing bullet need speed to match player’s inputs and C is again hero here.
  7. Its structured, high level, machine independent language that provide programmer a freedom to portability facility.(One computer to another).
  8. C compilers combine the facility of an assembly language plus high level language. And hence capable to write both operating system and business pack. Many C compilers are itself written in C that is available in market.
  9. Another very important feature of C is its ability to extend itself .We can continuously add our own function to its library is convents.

Disadvantages Associated with C Language

  1. There is no strict type checking (for ex: we can pass an integer value for the floating data type).
  2. As the program extends it is very difficult to fix the bugs.
  3. There is no runtime checking.

Basic Structure of C program

  1. Documentation Section
  2. Link Section
  3. Definition Section
  4. Global Declaration Section
  5. -----------------------------------------------------------------
  6. main function section
  7. {
  8. //Declaration part
  9. //Executable part
  10. }
  11. -----------------------------------------------------------------
  12. Sub program section
  13. Function 1
  14. Function 2
  15. --
  16. -- //user defined function
  17. --
  18. Function n

No comments:

Post a Comment