C & Its Structure-1
C & Its Structure-1
History of C
The C language was developed by Dennis Ritchie at Bell Laboratories in 1972. It was
designed to overcome the limitations of an earlier language called B, which was used
primarily for system programming. B itself was derived from another language called BCPL.
C was created to provide a more powerful and versatile programming tool, especially for
writing operating systems and low-level software. Its design aimed to be efficient and close
to the hardware, while also being flexible and portable across different computer systems.
Let's see the programming languages that were developed before C language.
Language Year Developed By
1. Foundation for Other Languages: C is the basis for many modern programming languages,
including C++, C#, and Objective-C. Understanding C provides a solid foundation for learning
these languages.
3. Efficiency and Performance: C provides fine control over system resources and memory
management, leading to highly efficient and performant code. This efficiency is crucial in
environments with limited resources, such as embedded systems.
4. Portability: Programs written in C can be compiled and run on different types of computer
systems with minimal changes. This cross-platform capability is one of C's key strengths.
5. Widespread Use: Due to its efficiency and versatility, C is used in various domains,
including embedded systems, game development, and high-performance computing.
Features of C Language
1. Simplicity: C has a simple and straightforward syntax that is easy to learn and use. This
simplicity helps programmers understand and write efficient code.
2. Low-Level Access: C provides low-level access to memory through pointers, allowing for
direct manipulation of hardware and memory addresses. This feature is essential for system
programming.
4. Rich Library Support: C comes with a standard library that provides a wide range of
functions for performing common tasks, such as input/output operations, string handling,
and mathematical computations.
6. Efficiency: C's design allows for high performance and efficient use of system resources,
making it suitable for developing software that requires high-speed execution and low
overhead.
8. Extensibility: C supports the use of user-defined functions and data types, allowing
programmers to extend the language's capabilities to suit their specific needs.
Structure of C program
The structure helps us analyze the format to write a program for the least errors. It gives
better clarity & concept of program.
The structure of a language gives us a basic idea of the order of the sections in a program.
We get to know when & where to use a particular statement, variable, function, curly braces,
parentheses etc.
It consists of 6 sections:
Character set : In C programming, a character set refers to the set of characters that the
language recognizes and can use in the source code. These characters are categorized
into several groups:
1. Letters
• Uppercase Letters: A to Z
• Lowercase Letters: a to z
2. Digits
• Digits: 0 to 9
3. Special Characters