C Language Introduction
C is a high-level language originally developed by Dennis M. Ritchie for UNIX operating system at Bell Labs. For the first time C Language was implemented on the DEC PDP-11 computer in 1972.
In 1978, Brian Kernighan and Dennis Ritchie introduced description of C, now known as the K&R standard.
The UNIX operating system was originally developed in assembly language but later re-written in C language.
C is now considered the basic programming standard for Programming enthusiasts because of the following reasons-
- C is a High Level Language
- C Language is Easy to learn
- It’s a Structured Programming language
- C Language produces efficient programs
- C Language is capable of handling low-level programs
- C is a Compiled Language.
Facts about C
- C Language was developed to write UNIX operating system.
- C Language is originated from B language.
- The C language was formalized in 1988 by the reputed American National Standard Institute (ANSI).
- The UNIX OS has been totally re-written in C Language.
- C Language is most widely used System Level Programming Language and is quite popular today.
- Most of the state-of-the-art software have been implemented using C.
- C Language has been used to develop huge popular Linux OS and RDBMS MySQL etc.
Where we use C?
C Programming Language was originally used for Operating System development but it was adopted as a system development language because it produced codes that runs nearly as fast as the code written in assembly language. Some usages of C are −
- Used in Development of Operating Systems
- Used to develop Language Compilers
- Used in programming Assemblers
- Used to develop Text Editors
- Programming Print Spoolers
- Used to program Network Drivers
- Used in Modern Programs
- Used to develop Databases
- Used to program Language Interpreters
- Used in creation of various Utilities
Characteristics of C Programming Language
1) Simple
C Programming Language is a simple language as it provides a structured approach (to break the problem into parts), the rich set of library functions, data types, etc.
2) Small Size
C Language has just 32 keywords and 5 more has been added in newer versions.
3) Machine Independent or Portable
Assembly Language creates machine dependent programs but c programs can be executed on different machines with some machine specific changes. Hence, C is a machine independent language.
4) Low level to high level programming language
Initially, C Language is used to do low-level and system level programming. But now It is used to develop system applications such as kernel, driver, and application programs by supporting the features of a high-level language.
5) Structured programming language
C Language is a structured programming language as it can break the program into smaller and more manageable parts using functions. Which makes it is easy to understand and modify. Functions in C Language also provide code re-usability.
6) Rich Library
C Compilers contains a lot of inbuilt functions to handle various tasks such as Mathematics, Graphics and Input and Output functions to make the development fast.
7) Dynamic Memory Management
C Language supports dynamic memory allocation. which helps in allocation and de-allocation of memory at any time by calling malloc() and free() functions.
8) Speed of execution
Due to smaller program size and lesser memory requirements, the compilation and execution time of C language is quite fast. Also C Language has lesser inbuilt functions and hence the lesser overhead.
9) Pointer Implementation
C Language uses pointers for many applications extensively . Pointers are used to interact with memory directly. Pointers can be used for memory, structures, functions, array, etc.
10) Recursion
In C Language a function can call itself within the function. This feature provides code re-usability for every function. Recursion helps in enabling the use of backtracking.
11) Extensible
C language can easily adopt new features just by adding header files or libraries to it.
Drawbacks of C Language
- It has poor error detection.
- There is no uniform associativity among operators and some precedence is wrong.
- Multiple use of symbols like ‘*’ and ‘=’. Here ‘*’ is used for multiplication and as pointers as well.
- It is loosely typed language.
- Almost no run-time error checking.
What are Translators
Any program written in any language should be first converted into computer understandable language/format i.e. machine language. Machine language comprises of ‘0’ and ‘1’ also called binary language. So, the program that converts source programs(actual program written in any language) into object program(program which is understandable by the computer) is called translator.
Translators are of three types
- Assembler
- Compilers
- Interpreters
Assembler
An assembler is a special program which translates assembly program into machine language instructions. The assembly language consisting of mnemonics codes and symbolic addresses are translated into machine codes and machine addresses respectively.
Compiler
The Compiler is a special kind of program which reads the source code written in source file, checks it for Syntax and lexical errors before converting it to executable program. Compiler scan whole program in one go and execute it.
Interpreter
interpreter is a program that translates the high level language program into machine level program on the fly. It interprets the program instruction wise means it scans the program line by line. If there is an error in line no 2, then will not go to line no 3 and stops the program interpretation. This way one can know the exact location of error and debug it.
Difference between Compiler and Interpreter
S.No | Compiler | Interpreter |
1 | Compiler translates the whole source program into machine codes before object program is loaded into memory | An Interpreter takes one instruction one at a time, translates it, executes it and then goes to the next instruction. |
2 | Compiler translates the program only once and loads the object programs into the memory. | Interpreter translates the program every time the program is to be executed. |
3 | Compiled program executes much faster as compare to the same program being interpreted | Interpreted programs execute much slower than the compiled one. |
4 | Compiler returns all the errors in the source program at once | An interpreter returns errors instruction wise. |
Installation of C Program
There are many versions of C Language. C Language Program is a very small program of 3.6 MB which can be downloaded and installed from many sites. To download Turbo C/C++ Compiler for windows 7/8.1/10 Click here.
This is just introduction to C Programming Language. Hope you will find it informative. In case of any queries pl feel free to comment and share .
You may also Like :
HTML Introduction Let us Learn JavaScript from Step By Step How to Activate GST in Tally.ERP9 ?
Who Invented C Language
C Language was developed by Dennis M. Ritchi in 1972
What is Source Code
Actual Program written in any programming language is called source code. e.g. C is a high level language and the programs written in c are saved with extension ‘.c’ are called source code.
What are object codes
These the codes understood by the computer . When source code are translated to machine codes then these codes are called object codes. These files have extension ‘.obj’.
Thanks sir ji
Easy and simple to understand
[…] Similar Topic : C Language Introduction […]
[…] Similar Topics : Elements of C Language C Language Introduction […]
[…] C Language Introduction Elements of C Language Variables in C […]
[…] C Language Introduction Let us Learn JavaScript from Step By Step How to Activate GST in Tally.ERP9 ? What is New in HTML5 […]