Introduction Of C Language

What is Language?

Before we start to learn “C Language” we should know “What is Language?”
* A system for communicating / medium of communication.
* The way we communicate with each other.
* We have to communicate with computers.
* Computer understands the language of 0’s and 1’s i.e. low-level language / binary level language/machine level language.
* Machine language is the lowest level of programming language.
* It is the only language understood by computers.
* While easily understood by computers, machine languages are almost impossible for humans to use/understand because they consist entirely of numbers.
* Programmers, therefore, use either a high-level programming language or an assembly language.
* An assembly language contains the same instructions as a machine language, but the instructions and variables have names instead of being just numbers.
* Assembly language programs are translated into machine language by a program called an assembler.
* Programs written in high-level languages are translated into assembly language or machine language by a translator (compiler/ Interpreter).

Language Processors

Language processors are the software that converts a program written in the human-understandable form to machine-understandable form. The language processors used are:

Assembler

This language processor converts the program written in assembly language into machine language.

Interpreter

This language processor converts HLL (High-level language) program into machine language by converting and executing it line by line. If there is an error in any line, it reports it at the same time and program execution cannot resume until the error is rectified.

Compiler

This language processor converts HLL (High-level language) program into machine language but the conversion method is different. It converts the entire program in one go and reports all the errors of the program along with line numbers. Once all the errors are removed, the program is recompiled and the program is ready for execution.

The difference between an interpreter and a compiler is given below:

Interpreter Compiler
An interpreter translates program one statement at a time. Compiler scans the entire program and translates it as a whole into machine code.
An interpreter takes less amount of time to analyze the source code but the overall execution time is slower. A compiler takes a large amount of time to analyze the source code but the overall execution time is comparatively faster.
In the case of Interpreter, no intermediate object code is generated and hence is memory efficient. In the case of Compiler, it generates intermediate object code which further requires linking and hence requires more memory.
It Continues translating the program until the first error is detected, in which case it stops. And therefore debugging is easy. It generates error messages after scanning the whole program. And therefore debugging is comparatively hard.
Interpreters are used by a programming language like Basic, lisp , LOGO, php, Python, Ruby, etc. Compilers are used by a programming language like COBOL, Pascal, C, C++, etc.

What is the C language?

Well, the answer is quite simple. It is a procedural programming language that was designed and written by Dennis Ritchie at AT & T’s Bell Labs in 1972. In the early 70s very frequently new programming languages were introduced. But after the launch of C, it slowly replaced the old languages like ALGOL. Actually no one advertises this language and even Ritchie was surprised that so many peoples were using C language. Till now many languages have come. But the popularity of C is not changed. The main reason behind it is that it is still fast, reliable and easy to use.

Why C should be your first programming language?

Seriously many people claim that no one should start its programming journey through C++, C#, or JAVA. Well, I think nobody will be comfortable while studying advanced concepts like OOPS from the start.

C is simple and easy to learn so one should start a programming journey with C language. It is a commonly used computer programming language. If you want a job in programming, you will need to know this language. And if one master the “C” language then he can definitely learn, understand and master other languages easily.

But what makes C the language that everyone wants to use. Well, its been around for quite some time. C is the most versatile high-level language. C permits just about anything, allowing programmers to write straight to the metal. Its code runs very fast.

C Language Programming Tutorial

C Language Tutorial Home     Introduction to C Language     Tokens     If Condition      goto statement and Labelname     Switch Statements     For loop     While Loop     Do while loop     break and continue     Functions     Recursion     Inbuild Functions     Storage Classes     Preprocessor     Arrays     Pointers     Structures and Unions     File Handling     Projects