SlideShare ist ein Scribd-Unternehmen logo
1 von 53
C Programing
Created by
APURBO DATTA
What is programing
A programming language is a formal computer language or
constructed language designed to communicate instructions to a
machine, particularly a computer. Programming languages can
be used to create programs to control the behavior of a machine
or to express algorithms.
Language year Developed By
ALGOL 1960 International Group
BPCL 1967 Martin Richards
B 1970 Ken Thompson
Traditional C 1972 Dennis Ritchie
K & R C 1978 Kernighan & Dennis Ritchie
ANSI C 1989 ANSI Committee
ANSI/ISO C 1990 ISO Committee
C99 1999 Standardization
Committee
What is C Programing
• C is a high-level and general purpose programming language that is ideal
for developing firmware or portable applications. Originally intended for
writing system software, C was developed at Bell Labs by Dennis Ritchie for
the Unix Operating System (OS) in the early 1970s.
variables
NOT Operator (!)
The NOT operator (!) is used to reverse the results. This
operator is mainly used as a key in big complex programs.
By using this operator we can reverse the condition easily.
Lets try to understand it with an example.
If ( !(y>6) )
In the above statement I am writing a condition that y
should be lesser than or equal to 6. I can also write the
same condition as
If (y<=6)
Both the statements will give the same results. You can
use anyone of them.
Hierarchy of Operators
I have given the hierarchy of operators after arithmetic operators. Now we have learnt
about the logical operators (AND OR NOT) too. So the new hierarchy of operators is given
below.
(Expression 1 ? expression 2 : expression 3)
It is generally used to avoid small if-else statement. Remember it is not the alternative of if-else
clauses. It can used at some places.
Lets try to understand it with some simple example.
if (x==10)
Y=3;
else
Y=9;
In the above we are basically checking if x is equal to 10. If condition turns true then it will assign
y as 3. Otherwise it will assign y as 9. The same task can be completed using ternary operator.
Y=(x==10 ? 3 : 9);
Conditional Operators
They are also called ternary operators. As we have to use three
arguments to use this operator.
General form of Conditional/Ternary operator
Nested Conditional Operator
Well nested conditional operators are used very rarely but
they are good to make the program compact.
A small example of nested ternary operator is given below
Small = ( x < y ? ( x > z ? 9: 10 ) : ( y > z ? 14: 16 ) ) ;
In the above example small is the variable and it will store
9 if x<y and x>z
10 if x<y and x<z
14 if x>y and y>z
16 if x>y and y<z
Sounds confusing? Well that’s why they are used rarely.
But like our example, it can sometimes make the program
compact.
Switch statement:
The switch statement is also an selection statement.It is mostly a matter of
preference
which you use,if we want to perform addition,subtraction,multiplication
and division at your selection this can be done by switch statement.The
syntax of switch statement is as follows
switch(expression)
A do-while statement is a looped structure which is
repeated for that particular condition. The
syntax of do-while statement is as follows
Do-while statement:
While loop:
This statement is also a looped structure, in this we pass
some condition in while if that
condition is true the loop will continue if it is false the
loop terminate.
Let us see the syntax
while(condition is true)
{
action 1;
}
example:
for(i=1;i<=n;i++)
{
f=f*i;
}
For loop:
This statement is very simpler than the other statements
in this we declare initialization
value, test value and increment or decrement at a time.
Let us see the syntax and one example
of this statement
for(initial value;test;increment or decrement)
{
action 1;
}
action 2;
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta
C programming-apurbo datta

Weitere ähnliche Inhalte

Was ist angesagt?

Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xiiSyed Zaid Irshad
 
1 introduction to c program
1 introduction to c program1 introduction to c program
1 introduction to c programNishmaNJ
 
Control Statements, Array, Pointer, Structures
Control Statements, Array, Pointer, StructuresControl Statements, Array, Pointer, Structures
Control Statements, Array, Pointer, Structuresindra Kishor
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programminggajendra singh
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRutvik Pensionwar
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpen Gurukul
 
C notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semC notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semKavita Dagar
 
Overview of c language
Overview of c languageOverview of c language
Overview of c languageshalini392
 
Decision statements in c language
Decision statements in c languageDecision statements in c language
Decision statements in c languagetanmaymodi4
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)Ashishchinu
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for EngineeringVincenzo De Florio
 
C programming Workshop
C programming WorkshopC programming Workshop
C programming Workshopneosphere
 

Was ist angesagt? (20)

C programming language
C programming languageC programming language
C programming language
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xii
 
1 introduction to c program
1 introduction to c program1 introduction to c program
1 introduction to c program
 
Control Statements, Array, Pointer, Structures
Control Statements, Array, Pointer, StructuresControl Statements, Array, Pointer, Structures
Control Statements, Array, Pointer, Structures
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
 
C notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semC notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-sem
 
Overview of c language
Overview of c languageOverview of c language
Overview of c language
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Decision statements in c language
Decision statements in c languageDecision statements in c language
Decision statements in c language
 
Programming in C
Programming in CProgramming in C
Programming in C
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
 
C programming Workshop
C programming WorkshopC programming Workshop
C programming Workshop
 
C program compiler presentation
C program compiler presentationC program compiler presentation
C program compiler presentation
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
C programming session3
C programming  session3C programming  session3
C programming session3
 
C program
C programC program
C program
 

Andere mochten auch

C programing -Structure
C programing -StructureC programing -Structure
C programing -Structureshaibal sharif
 
C programing basic input and output
C  programing basic input and outputC  programing basic input and output
C programing basic input and outputdhanajeyan dhanaj
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Howard Wong
 
C Programing Solve Presentation -CSE
C Programing Solve Presentation -CSEC Programing Solve Presentation -CSE
C Programing Solve Presentation -CSEsalman ahmed
 
Phần 10: Dữ liệu kiểu cấu trúc
Phần 10: Dữ liệu kiểu cấu trúcPhần 10: Dữ liệu kiểu cấu trúc
Phần 10: Dữ liệu kiểu cấu trúcHuy Rùa
 
Systems development
Systems developmentSystems development
Systems developmentElijah Liu
 
Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke LonerganLuke Lonergan
 
High study in abroad(indian subcontinent countries)
High  study in abroad(indian subcontinent countries)High  study in abroad(indian subcontinent countries)
High study in abroad(indian subcontinent countries)Apurbo Datta
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back AgainMarkus Voelter
 
Database Concept by Luke Lonergan
Database Concept by Luke LonerganDatabase Concept by Luke Lonergan
Database Concept by Luke LonerganLuke Lonergan
 
C language control statements
C language  control statementsC language  control statements
C language control statementssuman Aggarwal
 
Lập trình c++ có lời giải 2
Lập trình c++ có lời giải 2Lập trình c++ có lời giải 2
Lập trình c++ có lời giải 2Minh Ngoc Tran
 

Andere mochten auch (20)

C programing -Structure
C programing -StructureC programing -Structure
C programing -Structure
 
C programing basic input and output
C  programing basic input and outputC  programing basic input and output
C programing basic input and output
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Programming in c
Programming in cProgramming in c
Programming in c
 
C language ppt
C language pptC language ppt
C language ppt
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3
 
C Programing Solve Presentation -CSE
C Programing Solve Presentation -CSEC Programing Solve Presentation -CSE
C Programing Solve Presentation -CSE
 
Phần 10: Dữ liệu kiểu cấu trúc
Phần 10: Dữ liệu kiểu cấu trúcPhần 10: Dữ liệu kiểu cấu trúc
Phần 10: Dữ liệu kiểu cấu trúc
 
Systems development
Systems developmentSystems development
Systems development
 
Ch10
Ch10Ch10
Ch10
 
Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke Lonergan
 
High study in abroad(indian subcontinent countries)
High  study in abroad(indian subcontinent countries)High  study in abroad(indian subcontinent countries)
High study in abroad(indian subcontinent countries)
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back Again
 
Database Concept by Luke Lonergan
Database Concept by Luke LonerganDatabase Concept by Luke Lonergan
Database Concept by Luke Lonergan
 
C language control statements
C language  control statementsC language  control statements
C language control statements
 
SEMINAR
SEMINARSEMINAR
SEMINAR
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
Lập trình c++ có lời giải 2
Lập trình c++ có lời giải 2Lập trình c++ có lời giải 2
Lập trình c++ có lời giải 2
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 

Ähnlich wie C programming-apurbo datta

Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentalsumar78600
 
Python Programming Module 3 (2).pdf
Python Programming Module 3 (2).pdfPython Programming Module 3 (2).pdf
Python Programming Module 3 (2).pdfThanmayee S
 
C statements.ppt presentation in c language
C statements.ppt presentation in c languageC statements.ppt presentation in c language
C statements.ppt presentation in c languagechintupro9
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statisticsDorothy Bishop
 
C Control Statements.docx
C Control Statements.docxC Control Statements.docx
C Control Statements.docxJavvajiVenkat
 
Decision making and looping - c programming by YEASIN NEWAJ
Decision making and looping -  c programming by YEASIN NEWAJDecision making and looping -  c programming by YEASIN NEWAJ
Decision making and looping - c programming by YEASIN NEWAJYeasinNewaj
 
A Programmable Calculator Design and implement a programmable calc.pdf
A Programmable Calculator Design and implement a programmable calc.pdfA Programmable Calculator Design and implement a programmable calc.pdf
A Programmable Calculator Design and implement a programmable calc.pdfAlexelectronic1
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part維佋 唐
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kimkimberly_Bm10203
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.gerrell
 
basic of desicion control statement in python
basic of  desicion control statement in pythonbasic of  desicion control statement in python
basic of desicion control statement in pythonnitamhaske
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTESNi
 

Ähnlich wie C programming-apurbo datta (20)

Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
C Constructs (C Statements & Loop)
C Constructs (C Statements & Loop)C Constructs (C Statements & Loop)
C Constructs (C Statements & Loop)
 
Python Programming Module 3 (2).pdf
Python Programming Module 3 (2).pdfPython Programming Module 3 (2).pdf
Python Programming Module 3 (2).pdf
 
C statements.ppt presentation in c language
C statements.ppt presentation in c languageC statements.ppt presentation in c language
C statements.ppt presentation in c language
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statistics
 
C Control Statements.docx
C Control Statements.docxC Control Statements.docx
C Control Statements.docx
 
Lecture 9- Control Structures 1
Lecture 9- Control Structures 1Lecture 9- Control Structures 1
Lecture 9- Control Structures 1
 
Decision making and looping - c programming by YEASIN NEWAJ
Decision making and looping -  c programming by YEASIN NEWAJDecision making and looping -  c programming by YEASIN NEWAJ
Decision making and looping - c programming by YEASIN NEWAJ
 
A Programmable Calculator Design and implement a programmable calc.pdf
A Programmable Calculator Design and implement a programmable calc.pdfA Programmable Calculator Design and implement a programmable calc.pdf
A Programmable Calculator Design and implement a programmable calc.pdf
 
3.5
3.53.5
3.5
 
What is c
What is cWhat is c
What is c
 
JavaScript: Core Part
JavaScript: Core PartJavaScript: Core Part
JavaScript: Core Part
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kim
 
My final requirement
My final requirementMy final requirement
My final requirement
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.
 
Javascript
JavascriptJavascript
Javascript
 
basic of desicion control statement in python
basic of  desicion control statement in pythonbasic of  desicion control statement in python
basic of desicion control statement in python
 
Programming in Arduino (Part 2)
Programming in Arduino  (Part 2)Programming in Arduino  (Part 2)
Programming in Arduino (Part 2)
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 

Mehr von Apurbo Datta

Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-applicationApurbo Datta
 
Bioinformatrics and it's application
Bioinformatrics and it's applicationBioinformatrics and it's application
Bioinformatrics and it's applicationApurbo Datta
 
Data communication and communications technology
Data communication and communications technologyData communication and communications technology
Data communication and communications technologyApurbo Datta
 
Internet of Things(Bangladesh)
Internet of Things(Bangladesh)Internet of Things(Bangladesh)
Internet of Things(Bangladesh)Apurbo Datta
 
Algorithms In our Daily life
Algorithms In our Daily lifeAlgorithms In our Daily life
Algorithms In our Daily lifeApurbo Datta
 
How to improve Bangladeshi movie industry
How to improve Bangladeshi movie industryHow to improve Bangladeshi movie industry
How to improve Bangladeshi movie industryApurbo Datta
 
Digital Electronic and it application
Digital Electronic and it applicationDigital Electronic and it application
Digital Electronic and it applicationApurbo Datta
 
ROBOTICS Apurbo datta
ROBOTICS Apurbo dattaROBOTICS Apurbo datta
ROBOTICS Apurbo dattaApurbo Datta
 

Mehr von Apurbo Datta (11)

Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-application
 
Bioinformatrics and it's application
Bioinformatrics and it's applicationBioinformatrics and it's application
Bioinformatrics and it's application
 
Data communication and communications technology
Data communication and communications technologyData communication and communications technology
Data communication and communications technology
 
Genetic Disorder
Genetic DisorderGenetic Disorder
Genetic Disorder
 
Internet of Things(Bangladesh)
Internet of Things(Bangladesh)Internet of Things(Bangladesh)
Internet of Things(Bangladesh)
 
Algorithms In our Daily life
Algorithms In our Daily lifeAlgorithms In our Daily life
Algorithms In our Daily life
 
How to improve Bangladeshi movie industry
How to improve Bangladeshi movie industryHow to improve Bangladeshi movie industry
How to improve Bangladeshi movie industry
 
Java swing
Java swingJava swing
Java swing
 
Digital Electronic and it application
Digital Electronic and it applicationDigital Electronic and it application
Digital Electronic and it application
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
ROBOTICS Apurbo datta
ROBOTICS Apurbo dattaROBOTICS Apurbo datta
ROBOTICS Apurbo datta
 

Kürzlich hochgeladen

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Kürzlich hochgeladen (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

C programming-apurbo datta

  • 2. What is programing A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.
  • 3. Language year Developed By ALGOL 1960 International Group BPCL 1967 Martin Richards B 1970 Ken Thompson Traditional C 1972 Dennis Ritchie K & R C 1978 Kernighan & Dennis Ritchie ANSI C 1989 ANSI Committee ANSI/ISO C 1990 ISO Committee C99 1999 Standardization Committee
  • 4. What is C Programing • C is a high-level and general purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System (OS) in the early 1970s.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 12.
  • 13. NOT Operator (!) The NOT operator (!) is used to reverse the results. This operator is mainly used as a key in big complex programs. By using this operator we can reverse the condition easily. Lets try to understand it with an example. If ( !(y>6) ) In the above statement I am writing a condition that y should be lesser than or equal to 6. I can also write the same condition as If (y<=6) Both the statements will give the same results. You can use anyone of them.
  • 14. Hierarchy of Operators I have given the hierarchy of operators after arithmetic operators. Now we have learnt about the logical operators (AND OR NOT) too. So the new hierarchy of operators is given below.
  • 15. (Expression 1 ? expression 2 : expression 3) It is generally used to avoid small if-else statement. Remember it is not the alternative of if-else clauses. It can used at some places. Lets try to understand it with some simple example. if (x==10) Y=3; else Y=9; In the above we are basically checking if x is equal to 10. If condition turns true then it will assign y as 3. Otherwise it will assign y as 9. The same task can be completed using ternary operator. Y=(x==10 ? 3 : 9); Conditional Operators They are also called ternary operators. As we have to use three arguments to use this operator. General form of Conditional/Ternary operator
  • 16. Nested Conditional Operator Well nested conditional operators are used very rarely but they are good to make the program compact. A small example of nested ternary operator is given below Small = ( x < y ? ( x > z ? 9: 10 ) : ( y > z ? 14: 16 ) ) ; In the above example small is the variable and it will store 9 if x<y and x>z 10 if x<y and x<z 14 if x>y and y>z 16 if x>y and y<z Sounds confusing? Well that’s why they are used rarely. But like our example, it can sometimes make the program compact.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Switch statement: The switch statement is also an selection statement.It is mostly a matter of preference which you use,if we want to perform addition,subtraction,multiplication and division at your selection this can be done by switch statement.The syntax of switch statement is as follows switch(expression)
  • 26. A do-while statement is a looped structure which is repeated for that particular condition. The syntax of do-while statement is as follows Do-while statement:
  • 27. While loop: This statement is also a looped structure, in this we pass some condition in while if that condition is true the loop will continue if it is false the loop terminate. Let us see the syntax while(condition is true) { action 1; }
  • 28. example: for(i=1;i<=n;i++) { f=f*i; } For loop: This statement is very simpler than the other statements in this we declare initialization value, test value and increment or decrement at a time. Let us see the syntax and one example of this statement for(initial value;test;increment or decrement) { action 1; } action 2;