C PROGRAMMING INTRODUCTION-converted
C PROGRAMMING INTRODUCTION-converted
Machine Language
This is one of the most basic low level languages. The language was first developed to interact
with the first generation computers. It is written in binary code or machine code, which means it
basically comprises of only two digits – 1 and 0.
Assembly Language
As we know that computers can only understand the machine-level instructions, so we require a
translator that converts the assembly code into machine code. The translator used for translating
the code is known as an assembler.
High-Level Language
The high-level language is a programming language that allows a programmer to write the
programs which are independent of a particular type of computer. The high-level languages are
considered as high-level because they are closer to human languages than machine-level
languages.
• The high-level language is easy to read, write, and maintain as it is written in English like words.
• The high-level languages are designed to overcome the limitation of low-level language, i.e.,
portability. The high-level language is portable; i.e., these languages are machine-independent.
C LANGUAGE INTRODUCTION
C programming is a general-purpose, procedural, imperative computer programming language
developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX
operating system. C is the most widely used computer language.
Applications of C Programming
Operating Systems
Language Compilers
Assemblers
Text Editors
Print Spoolers
Network Drivers
Databases
Language Interpreters
Utilities
C is a compiled language. A compiler is a special tool that compiles the program and converts it
into the object file which is machine readable. After the compilation process, the linker will
combine different object files and creates a single executable file to run the program. The
following diagram shows the execution of a 'C' program
C programming is considered as the base for other programming languages, that is why it is known as
mother language.
Features of C Language
C is the widely used language. It provides many
features that are given below.
1. Simple
2. Machine Independent or Portable
3. Mid-level programming language
4. structured programming language
5. Rich Library
6. Memory Management
7. Fast Speed
8. Pointers
9. Recursion
10. Extensible
1) Simple
C is a simple language in the sense that it provides a structured approach (to break the problem
into parts), the rich set of library functions, data types, etc.
Unlike assembly language, c programs can be executed on different machines with some
machine specific changes. Therefore, C is a machine independent language.
3) Mid-level programming language
C is a structured programming language in the sense that we can break the program into parts
using functions. So, it is easy to understand and modify. Functions also provide code reusability.
5) Rich Library
6) Memory Management
It supports the feature of dynamic memory allocation. In C language, we can free the allocated
memory at any time by calling the free() function.
7) Speed
The compilation and execution time of C language is fast since there are lesser inbuilt functions
and hence the lesser overhead.
8) Pointer
C provides the feature of pointers. We can directly interact with the memory by using the
pointers. We can use pointers for memory, structures, functions, array, etc.
9) Recursion
In C, we can call the function within the function. It provides code reusability for every
function. Recursion enables us to use the approach of backtracking.
10) Extensible