Introduction to C Languag
This presentation provides an overview of the C programming
language, its history, syntax, and basic concepts. We'll explore key
elements such as data types, operators, control structures, and
functions. Finally, a simple C program demonstration will bring the
concepts to life.
by Soumyajit Singha Roy
What is C Language?
Low-Level Access Widely Used
Direct control over hardware, making it efficient and Foundation for many operating systems and
powerful programming languages
History and Development of C
1 2 3
1970s 1980s 1990s and Beyond
Developed at Bell Labs by Dennis Gained popularity with UNIX Became a foundational language
Ritchie operating system for system programming
Basic C Language Syntax
1 Keywords 2 Identifiers
Reserved words with Names given to variables,
specific meanings, such as functions, and other
"int," "float," and "for" elements
3 Operators
Symbols that perform operations on data, such as "+" and "-"
Variables and Data Types in C
Integer (int) Floating-Point (float)
Whole numbers Numbers with decimal points
Character (char) String
Single characters Sequence of characters
Operators and Expressions in C
Arithmetic Relational Logical
+, -, *, /, % ==, !=, >, <, >=, <= &&, ||, !
Control Structures in C
if/else
1
Conditional statements
for
2
Looping for a fixed number of iterations
while
3
Looping until a condition is met
switch
4
Multiple choice decision-making
Functions in C
Modular Programming
1 Break down code into reusable blocks
Parameters
2
Inputs passed to the function
Return Values
3
Output produced by the function
Hands-on Demo:
Simple C Program
1 2
Input Processing
Read user data Perform calculations
3
Output
Display results