SlideShare a Scribd company logo
EMBEDDED SYSTEM
What is embedded system?
It is a combination of hardware and
software.
Some of the applications are for
example:
washing machine
digital watches
Ipod’s and etc..
What are the types of
embedded system?
Three types of embedded system’s are:
 Small scale embedded system
- digital watches
 Medium scale embedded system
- Ipod’s
 Large scale embedded system
- washing machine
What are the languages used in
embedded c?
INTRODUCTION OF C
LANGUAGES
 The C programming language was designed by
Dennis Ritchie at Bell Laboratories in the early
1970s
 Influenced by
◦ ALGOL 60 (1960),
◦ CPL (Cambridge, 1963),
◦ BCPL (Martin Richard, 1967),
◦ B (Ken Thompson, 1970)
 Traditionally used for systems programming,
though this may be changing in favor of C++
SOFTWARE
Two types of software's are used
1. Application software
2. Program software
the program s/w will create application
wise program and create normal program
also. Like c, c++,java,and visual basics.
Pre
processor
linker assembler
compiler
The Preprocessor
◦ #define : defines a macro
◦ #undef : removes a macro definition
◦ #include : insert text from file
◦ #if : conditional based on value of expression
◦ #ifdef : conditional based on whether macro
defined
◦ #ifndef : conditional based on whether macro
is not defined
◦ #else : alternative
◦ #elif : conditional alternative
Example program:
#include<stdio.h>
#include<conio.h>
Void main()
{
Printf(“A PLUS CADD”);
}
Getch();
CHARACTER SETS OF C
 Alphabets
single character ‘a’ or string ‘abc’.
 Numbers
int, float, long
 Special characters
: ; “ ‘ , & # * @
KEYWORDS
32 keywords
 Int
 float
 If
 If else
 For
 Exit
 Continue
VARIABLE and DATA TYPES
 Variable is used to store several values.
 DATA TYPE
character- “char”
integer - “int”
float - “f”
TYPES OF OPERATORS
 Arithmetic operators(+ - * / %)
 Relational operator(==,<=,>=,<,>,!=)
 Logical operator(&&,||, ~)
 Assignment operator
 Inc/dec operator(pre,post)
 Conditional operator(check condition)
 Bitwise operator(right and left shift)
 Precedence operator(priority based)
INPUT AND OUTPUT SYSTEM
Unformatted formatted
Input output scanf and printf
Getchar() putchar()
Getch() putch()
Getc() putc()
Gets() puts()
Examples
 Scanf syntax:
(“control string”,&v1,&v2);
example
scanf(“%d”, &a &b);
 Printf syntax:
(“control string”,&v1,&v2”);
example
printf(“result %d”,a);
SPECIFIERS
%c single character
%d decimal integer
%s string
%f,%e float value
%ld long integer
%o octal number
%x hexa decimal number
%h short integer
CONTROL STATMENTS
 If
 If else
 If else if
 Switch case
LOOPING
For
while
do while
 GOTO
IF CONDITION
Syntax: example:
If(condition) if(y%2==0)
{ {
Statement; printf(“even no”)
} }
IF ELSE CONDITION
Syntax: example:
If(condition) if(y%4==0)
{ {
Statement; printf(“leap year”);
} }
Else else
{ {
Statement; printf(“non leap year”);
} }
NESTED IF
SYNTAX:
if(condition 1)
{
if(condition 2)
{
statement;
}
Else
{
If(condition 3)
{
Statement;
}
Example program
Main()
{
Int a=1,b=2,c=3,d=4;
If(d>c)
if(c>d)
Printf(“%d%d”,d,c);
If(c>a)
Printf(“%d%d,c,d);
If(c>a)
If(b>a)
Printf(“%d%d”,c,a);
If(b>c)
Printf(“%d%d”,b,c);
Return(0);
Getch();
}
IF ELSE LADDER
SYNTAX:
if(condition 1)
{
statement;
}
Else if
{
If(condition 2)
{
Statement;
}
Else
{
Statement;
}
Example program
If(a<b & b<c & c<d)
{
Printf(“%d”,a);
{
Else if(b<c & c<d)
{
Printf(“%d”,b);
}
Else if(c<d)
{
Printf(“%d”,c);
}
Else
{
Printf(“%d”,d);
}
Getch();
}
Example program to find smallest number
LOOPING STATEMENT
WHILE LOOP (entry control loop)
Syntax:
while(condition)
{
Statement;
}
Example program
#include<stdio.h>
Void main()
{
Int i;
i=0;
While(i<10)
{
Printf(“%d”,i);
i++;
}
}
LOOPING STATEMENT
DO WHILE LOOP (exit control loop)
Syntax:
do
{
Statement;
}
while(condition)
Example program
#include<stdio.h>
Void main()
{
Int i;
i=0;
Do
{
Printf()
Scanf(“%d”,i);
i++;
}
While(i<10);
}

More Related Content

What's hot

Intro to c chapter cover 1 4
Intro to c chapter cover 1 4Intro to c chapter cover 1 4
Intro to c chapter cover 1 4
Hazwan Arif
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
tanmaymodi4
 
C program compiler presentation
C program compiler presentationC program compiler presentation
C program compiler presentation
Rigvendra Kumar Vardhan
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error prediction
NIKHIL NAWATHE
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
 
6 compiler lab - Flex
6 compiler lab - Flex6 compiler lab - Flex
6 compiler lab - Flex
MashaelQ
 
Workhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de SwiftWorkhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de Swift
Visual Engineering
 
Haxe by sergei egorov
Haxe by sergei egorovHaxe by sergei egorov
Haxe by sergei egorov
Sergei Egorov
 
CPU INPUT OUTPUT
CPU INPUT OUTPUT CPU INPUT OUTPUT
CPU INPUT OUTPUT
Aditya Vaishampayan
 
JavaScript: The Language
JavaScript: The LanguageJavaScript: The Language
JavaScript: The Language
Engage Software
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab File
Kandarp Tiwari
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in C
Muthuganesh S
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)
SURBHI SAROHA
 
Basic Input and Output
Basic Input and OutputBasic Input and Output
Basic Input and Output
Nurul Zakiah Zamri Tan
 
Storage class
Storage classStorage class
Storage class
MANJULA_AP
 
Compiler and symbol table
Compiler and symbol tableCompiler and symbol table
Compiler and symbol table
Sunjid Hasan
 
Unit 3. Input and Output
Unit 3. Input and OutputUnit 3. Input and Output
Unit 3. Input and Output
Ashim Lamichhane
 
Storage Class in C Progrmming
Storage Class in C Progrmming Storage Class in C Progrmming
Storage Class in C Progrmming
Kamal Acharya
 
C language
C languageC language
C language
Priya698357
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functions
Way2itech
 

What's hot (20)

Intro to c chapter cover 1 4
Intro to c chapter cover 1 4Intro to c chapter cover 1 4
Intro to c chapter cover 1 4
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
 
C program compiler presentation
C program compiler presentationC program compiler presentation
C program compiler presentation
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error prediction
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
6 compiler lab - Flex
6 compiler lab - Flex6 compiler lab - Flex
6 compiler lab - Flex
 
Workhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de SwiftWorkhop iOS 1: Fundamentos de Swift
Workhop iOS 1: Fundamentos de Swift
 
Haxe by sergei egorov
Haxe by sergei egorovHaxe by sergei egorov
Haxe by sergei egorov
 
CPU INPUT OUTPUT
CPU INPUT OUTPUT CPU INPUT OUTPUT
CPU INPUT OUTPUT
 
JavaScript: The Language
JavaScript: The LanguageJavaScript: The Language
JavaScript: The Language
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab File
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in C
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)
 
Basic Input and Output
Basic Input and OutputBasic Input and Output
Basic Input and Output
 
Storage class
Storage classStorage class
Storage class
 
Compiler and symbol table
Compiler and symbol tableCompiler and symbol table
Compiler and symbol table
 
Unit 3. Input and Output
Unit 3. Input and OutputUnit 3. Input and Output
Unit 3. Input and Output
 
Storage Class in C Progrmming
Storage Class in C Progrmming Storage Class in C Progrmming
Storage Class in C Progrmming
 
C language
C languageC language
C language
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functions
 

Viewers also liked

Java essentials for hadoop
Java essentials for hadoopJava essentials for hadoop
Java essentials for hadoop
KCC Software Ltd. & Easylearning.guru
 
Preservation script - Final draft
Preservation script - Final draftPreservation script - Final draft
Preservation script - Final draft
Sundeep_Singh
 
Quando il brand diventa sinonimo della categoria di prodotto: il caso Autan
Quando il brand diventa sinonimo della categoria di prodotto: il caso AutanQuando il brand diventa sinonimo della categoria di prodotto: il caso Autan
Quando il brand diventa sinonimo della categoria di prodotto: il caso AutanTarget Research
 
Diagnosing lungs cancer Using Neural Networks
Diagnosing lungs cancer Using Neural NetworksDiagnosing lungs cancer Using Neural Networks
Diagnosing lungs cancer Using Neural Networks
IJSRD
 
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdlIaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
Iaetsd Iaetsd
 
Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
 Strategie di comunicazione online per prodotti innovativi. Uno studio empiri... Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
Target Research
 
Simulation and synthesis of error tolerance adder
Simulation and synthesis of error tolerance adderSimulation and synthesis of error tolerance adder
Simulation and synthesis of error tolerance adder
venkatesh deekonda
 
New Virtualization Technologies
New Virtualization TechnologiesNew Virtualization Technologies
New Virtualization Technologies
Open Networking Perú (Opennetsoft)
 
C++ control loops
C++ control loopsC++ control loops
C++ control loops
pratikborsadiya
 
Unit 5. Control Statement
Unit 5. Control StatementUnit 5. Control Statement
Unit 5. Control Statement
Ashim Lamichhane
 
Xavier van Ruymbeke, App. Engineer, Arteris
Xavier van Ruymbeke, App. Engineer, ArterisXavier van Ruymbeke, App. Engineer, Arteris
Xavier van Ruymbeke, App. Engineer, Arteris
chiportal
 
Ramya Project
Ramya ProjectRamya Project
Ramya Project
Ramya Purohit
 
Searching
SearchingSearching
Searching
Ashim Lamichhane
 
Extubation presentation
Extubation presentationExtubation presentation
Extubation presentation
Jo Annette van Wyk
 
Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14
cjfoss
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adder
ABIN THOMAS
 
Office365 Lessons Learned
Office365 Lessons LearnedOffice365 Lessons Learned
Office365 Lessons Learned
Joël Bruijn
 
Use of cardiovascular triggers
Use of cardiovascular triggersUse of cardiovascular triggers
Use of cardiovascular triggers
avinashkhairnar
 
Violencia power point
Violencia power pointViolencia power point
Violencia power point
yamithaugusto
 

Viewers also liked (20)

Java essentials for hadoop
Java essentials for hadoopJava essentials for hadoop
Java essentials for hadoop
 
Preservation script - Final draft
Preservation script - Final draftPreservation script - Final draft
Preservation script - Final draft
 
Quando il brand diventa sinonimo della categoria di prodotto: il caso Autan
Quando il brand diventa sinonimo della categoria di prodotto: il caso AutanQuando il brand diventa sinonimo della categoria di prodotto: il caso Autan
Quando il brand diventa sinonimo della categoria di prodotto: il caso Autan
 
Diagnosing lungs cancer Using Neural Networks
Diagnosing lungs cancer Using Neural NetworksDiagnosing lungs cancer Using Neural Networks
Diagnosing lungs cancer Using Neural Networks
 
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdlIaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
Iaetsd vlsi architecture for exploiting carry save arithmetic using verilog hdl
 
Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
 Strategie di comunicazione online per prodotti innovativi. Uno studio empiri... Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
Strategie di comunicazione online per prodotti innovativi. Uno studio empiri...
 
Carnaval 1990
Carnaval 1990Carnaval 1990
Carnaval 1990
 
Simulation and synthesis of error tolerance adder
Simulation and synthesis of error tolerance adderSimulation and synthesis of error tolerance adder
Simulation and synthesis of error tolerance adder
 
New Virtualization Technologies
New Virtualization TechnologiesNew Virtualization Technologies
New Virtualization Technologies
 
C++ control loops
C++ control loopsC++ control loops
C++ control loops
 
Unit 5. Control Statement
Unit 5. Control StatementUnit 5. Control Statement
Unit 5. Control Statement
 
Xavier van Ruymbeke, App. Engineer, Arteris
Xavier van Ruymbeke, App. Engineer, ArterisXavier van Ruymbeke, App. Engineer, Arteris
Xavier van Ruymbeke, App. Engineer, Arteris
 
Ramya Project
Ramya ProjectRamya Project
Ramya Project
 
Searching
SearchingSearching
Searching
 
Extubation presentation
Extubation presentationExtubation presentation
Extubation presentation
 
Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14Quantum-Espresso_10_8_14
Quantum-Espresso_10_8_14
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adder
 
Office365 Lessons Learned
Office365 Lessons LearnedOffice365 Lessons Learned
Office365 Lessons Learned
 
Use of cardiovascular triggers
Use of cardiovascular triggersUse of cardiovascular triggers
Use of cardiovascular triggers
 
Violencia power point
Violencia power pointViolencia power point
Violencia power point
 

Similar to Embedded system

C++ How to program
C++ How to programC++ How to program
C++ How to program
Mohammad Golyani
 
Lec-1c.pdf
Lec-1c.pdfLec-1c.pdf
Lec-1c.pdf
Ritikchaudhary72
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
Abhishek Sinha
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
M-TEC Computer Education
 
C
CC
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
UNIVERSITY OF ENGINEERING AND TECHNOLOGY TAXILA
 
Basics of c Nisarg Patel
Basics of c Nisarg PatelBasics of c Nisarg Patel
Basics of c Nisarg Patel
TechNGyan
 
C tutorials
C tutorialsC tutorials
C tutorials
Amit Kapoor
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
Aram Mohammed
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
Abdullah Jan
 
Foundations of Programming Part I
Foundations of Programming Part IFoundations of Programming Part I
Foundations of Programming Part I
VNIT-ACM Student Chapter
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
guest5de1a5
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
Widad Jamaluddin
 
Structure of a C program
Structure of a C programStructure of a C program
Structure of a C program
David Livingston J
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf
ssusere19c741
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
sajjad ali khan
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
rohassanie
 
02basics
02basics02basics
02basics
Waheed Warraich
 
Computer programming and utilization
Computer programming and utilizationComputer programming and utilization
Computer programming and utilization
Digvijaysinh Gohil
 
C intro
C introC intro
C intro
SHIKHA GAUTAM
 

Similar to Embedded system (20)

C++ How to program
C++ How to programC++ How to program
C++ How to program
 
Lec-1c.pdf
Lec-1c.pdfLec-1c.pdf
Lec-1c.pdf
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
C
CC
C
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
Basics of c Nisarg Patel
Basics of c Nisarg PatelBasics of c Nisarg Patel
Basics of c Nisarg Patel
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
Foundations of Programming Part I
Foundations of Programming Part IFoundations of Programming Part I
Foundations of Programming Part I
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
 
Structure of a C program
Structure of a C programStructure of a C program
Structure of a C program
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
02basics
02basics02basics
02basics
 
Computer programming and utilization
Computer programming and utilizationComputer programming and utilization
Computer programming and utilization
 
C intro
C introC intro
C intro
 

Embedded system