SlideShare a Scribd company logo
1 of 9
By
Y.Sai Sruthi,
15471A0495
Pre-processor statements
Global variable declaration section
Void main()
{
Local variable declaration section
<statements>
}
Void sub-function()
{
Local variable declaration section
<statements>
}
⦁ These are the statements which can be executed
before the program starts execution.
⦁ This can be executed in the compile time.
⦁ Compile time=compilation+linking.
⦁ Example:
#define
#undefine
#include
#if
#end if
#else
⦁ This is the 1st part of c code.
⦁ C language is a set of small small functions.
⦁ Let us take 3 functions in a c code.
⦁ The first function stores an integer value i.e
a=10.
⦁ So it can’t be used in remaining functions
then it is called local variable.we define them
at local variable declaration section.
⦁ But if we want to use a value througout all the
program then it should be declared at global
variable declaration section and is called
global variable
⦁ It is the main function of a c code
⦁ Every c program consists of only one main
function.
⦁ C program is a collection of many functions.
⦁ The first function we define is main function
and remaining all are sub functions.
⦁ This is the 3rd part of a c code.
⦁ To open any function we specify {.
⦁ That means the function gets opened.
⦁ To close any function we write}.
⦁ This closes the function.
⦁ We can write the statements in c in this
statements block.
⦁ The c code consists of many number of sub
functions if we need.
⦁ Soo we start the function ,we open,we declare
local variables ,we state and we close the
subfunction.
thank you

More Related Content

Similar to formofacprogram-180106145347.pptx

Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
Deepak Singh
 

Similar to formofacprogram-180106145347.pptx (20)

C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
C structure
C structureC structure
C structure
 
Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
 
Lect '1'
Lect '1'Lect '1'
Lect '1'
 
basic program
basic programbasic program
basic program
 
PPs16.pptx
PPs16.pptxPPs16.pptx
PPs16.pptx
 
Presentation 2 (1).pdf
Presentation 2 (1).pdfPresentation 2 (1).pdf
Presentation 2 (1).pdf
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
C notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semC notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-sem
 
Structure of c
Structure of cStructure of c
Structure of c
 
Presentation 2.pptx
Presentation 2.pptxPresentation 2.pptx
Presentation 2.pptx
 
Lecture 14 - Scope Rules
Lecture 14 - Scope RulesLecture 14 - Scope Rules
Lecture 14 - Scope Rules
 
C function presentation
C function presentationC function presentation
C function presentation
 
Functions
FunctionsFunctions
Functions
 
Functions
FunctionsFunctions
Functions
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
 
lecture1 pf.pptx
lecture1 pf.pptxlecture1 pf.pptx
lecture1 pf.pptx
 
Functions-Computer programming
Functions-Computer programmingFunctions-Computer programming
Functions-Computer programming
 

More from RohitRaj744272 (6)

projectors.ppt
projectors.pptprojectors.ppt
projectors.ppt
 
stealthtechnologysupreeth.pptx
stealthtechnologysupreeth.pptxstealthtechnologysupreeth.pptx
stealthtechnologysupreeth.pptx
 
M1. Introducing Computers Part A .pdf
M1. Introducing Computers Part A .pdfM1. Introducing Computers Part A .pdf
M1. Introducing Computers Part A .pdf
 
c_pro_introduction.pptx
c_pro_introduction.pptxc_pro_introduction.pptx
c_pro_introduction.pptx
 
pop2.pdf
pop2.pdfpop2.pdf
pop2.pdf
 
pop1.pdf
pop1.pdfpop1.pdf
pop1.pdf
 

Recently uploaded

Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
BalamuruganV28
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
IJECEIAES
 

Recently uploaded (20)

Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 

formofacprogram-180106145347.pptx

  • 2. Pre-processor statements Global variable declaration section Void main() { Local variable declaration section <statements> } Void sub-function() { Local variable declaration section <statements> }
  • 3. ⦁ These are the statements which can be executed before the program starts execution. ⦁ This can be executed in the compile time. ⦁ Compile time=compilation+linking. ⦁ Example: #define #undefine #include #if #end if #else ⦁ This is the 1st part of c code.
  • 4. ⦁ C language is a set of small small functions. ⦁ Let us take 3 functions in a c code. ⦁ The first function stores an integer value i.e a=10. ⦁ So it can’t be used in remaining functions then it is called local variable.we define them at local variable declaration section. ⦁ But if we want to use a value througout all the program then it should be declared at global variable declaration section and is called global variable
  • 5. ⦁ It is the main function of a c code ⦁ Every c program consists of only one main function. ⦁ C program is a collection of many functions. ⦁ The first function we define is main function and remaining all are sub functions. ⦁ This is the 3rd part of a c code.
  • 6. ⦁ To open any function we specify {. ⦁ That means the function gets opened. ⦁ To close any function we write}. ⦁ This closes the function.
  • 7. ⦁ We can write the statements in c in this statements block.
  • 8. ⦁ The c code consists of many number of sub functions if we need. ⦁ Soo we start the function ,we open,we declare local variables ,we state and we close the subfunction.