Introduction of C language
- C is a high-level programming language.
- It is a Structured & imperative (procedural) system implementation programming language.
- It is one of the most popular general-purpose programming languages developed between 1969 and 1973 by Dennis Ritchie at the Bell Laboratories.
- It is available on a wide range of platforms, from embedded micro-controllers to supercomputers.
History Of C Language
- C language was first developed in 1972 by Dennis Ritchie at AT&T Bell Labs.
- Ritchie called his newly developed language as ‘C’ simply because there was a ‘B’ programming language already. (As a matter of fact, the B language led to the development of C.)
- Most of its principles and ideas were taken from the earlier language B, BCPL (Basic Combined Programming Language) and CPL (Combined Programming Language).
File Extensions in C Programming Language:
|.c||This is source code file extension. C source code file containing various functions, statements etc created using any text editor or IDE.|
|.obj||This is object file (intermediate file) extension, compiler generates this file during the process of compilation|
|.exe||This is an executable file extension, after the successful compilation, compiler generates this file that can be run directly on the computer.|
|.lib||This is library file extension for library routines which are used in printing & reading of keyboard etc. It combines with object(.obj) file & finally generate executable(.exe) file.|
Characteristics/ Advantages of C language:
- C Language is a CASE SENSITIVE language.
- Reusablility: Programs written in C can be reused. You can save your C programs into a library file and invoke them in your next programming project simply by including the library file.
- Readability: C Programs are easy to read.
- Maintainability: C Programs are easy to maintain.
- Portability: C Programs are portable across different computer platforms by just recompile them according to the relative operating systems.
- Learnability: You don’t have to remember many C keywords or commands before you start to write programming in C.
- Major parts of popular operating systems like Windows, UNIX, Linux is still written in C.
Development of other languages based on C :
Many other high-level languages have been developed based on C. Example, Perl is a very popular programming language in World Wide Web (WWW) design across the Internet. Perl actually borrows a lot of features from C.
If you understand C, learning Perl is a snap. Another example is the C++ language, which is simply an expanded version of C, although C++ makes object-oriented programming easier. Also, learning Java becomes much easier if you already know C.
Disadvantages of C languages
- It is not Object Oriented Programming Language (OOPL) that’s why C++ comes into existence to overcome the disadvantages of C language.
- There is no runtime checking.
- There are some concepts that are not present in C language: 1. Constructor 2. Destructor
- Namespace and and other OOPS features ( Inheritance, Polymorphism, Encapsulation, Abstraction etc).
- There is no strict type checking i.e , when we pass an integer to an floating point type variable.