C Language
C Language
INTRODUCTION OF C
LANGUAGE
History of C language
• C is a general-purpose programming
language that was developed in the
early 1970s by Dennis Ritchie at
Bell Labs.
• It was originally designed as a
system programming language for
the Unix operating system.
Advantages of C language
• Efficiency: C is known for its high performance and efficiency. It allows low-level access to
memory and provides direct control over hardware, making it suitable for system-level
programming and resource-constrained environments.
• Portability: C is a widely supported language, and programs written in C can be compiled and run
on different platforms with minimal modifications. This portability makes it a popular choice for
developing cross-platform applications.
• Flexibility: C offers a wide range of features and allows programmers to have fine-grained control
over the code. It supports both procedural and object-oriented programming paradigms, enabling
developers to choose the most suitable approach for their projects.
• Extensibility: C supports the use of libraries and allows for the creation of reusable code modules.
This promotes code reuse, simplifies development, and enhances productivity.
• Legacy Code Compatibility: C has been around for several decades and has a large codebase.
Many existing systems and libraries are written in C, making it necessary to know the language to
maintain and integrate with legacy codebases.
Variables and Data Types
Declaring Variables
Data Types
• C supports various data types, including int, float, char,
double, void.
Assigning Values
Using Variables
Printing Variables