C Programming
C Programming
SeminarPpt.com
Seminar
On
C
Programming
TABLE OF CONTENTS
1. Introduction to C
2. History of C
3. Features of C
4. Structure of a C Program
5. Basic Syntax
6. Data Types, Variables, and Operators
7. Control Statements
8. Applications of C
9. Conclusion
3
INTRODUCTION
TO C
What is C
programming?
Definition: C is a high-
level, general-purpose
programming language that
provides low-level access to
memory and system
processes.
HISTORY OF
C
Origin: Developed by Dennis Ritchie
at Bell Labs in 1972.
Evolution:
FEATURES
OF C
Simplicity: Simple syntax
and easy to learn.
STRUCTURE OF C
#include <stdio.h> //
Preprocessor directive BASIC SYNTAX
Preprocessor Directive:
// Function declaration
int main() { #include <stdio.h>: This line
// Variable declaration includes the Standard Input
int a; Output library, which allows
the use of functions like printf.
// Initialization
Function Declaration:
a = 10;
int main() : This line declares
MARGIE'S
TRAVEL
// Function call
the main function, which is
printf("Value of a is %d\
n", a); the entry point of any C
program.
// Return statement Variable Declaration:
return 0;
M } int a; : This line declares an
9
#include <stdio.h> //
Preprocessor directive
BASIC SYNTAX
Initialization::
// Function declaration
int main() { a = 10;: This line initializes the
// Variable declaration variable a with the value 10.
int a;
Return Statement:
Operato
rs
Arithmetic Operators: +,
-, *, /, %
Relational Operators:
==, !=, >, <, >=, <=
Logical Operators: &&, ||,
!
Assignment Operators:
=, +=, -=, *=, /=, %=
Increment/Decrement
Operators: ++, --
12
CONTROL STATEMENTS
if (condition) { if (condition) {
// code // code
MARGIE'S TRAVEL
} } else {
The if statement // code
executes a block of }
code if a specified The if-else statement
condition is true. executes one block of
code if the condition is
true, and another
block if the condition
is false.
13
CONTROL STATEMENTS
Switch Statement:
switch (variable) {
case value1: The switch
// code statement executes
break; one of many blocks
of code based on the
case value2: value of a variable.
// code
break;
default:
// code
}
14
CONTROL STATEMENTS
CONTROL STATEMENTS
Do-while loop:
The do-while
loop is similar
to the while DO {
loop, but it
// CODE TO BE
exe c u t e s t h e
block of code EXECUTED
at least once } WHILE
b e f o re (CONDITION);
checking the
condition.
16
APPLICATION
S OF C
Operating Systems: Unix,
Linux, Windows
Embedded Systems:
Microcontrollers, IoT devices
Game Development:
Game engines, graphics
programming
Database Systems:
MySQL, Oracle
17
CONCLUSION
REFERENCE
S
• Wikipedia.org
• Google.com
• Seminarppt.com
• Studymafia.org
19
Thanks
To
SeminarPpt.Com