尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
INTRODUCTION
TYPES
Storage Class in C
Introduction
Storage class explain the behavior of the variable in
terms of scope and lifetime, it also determine the
initial of the variable.
Scope of the variable is the region over which the
variable is visible or valid.
Life time of the variable is the time during which
memory is associated with the variable.
Initial value is the value assigned to the variable
implicitly if no value is assigned to it by the
programmer.
There are four types of storage class available in C:
 Auto
 Extern
 Static
 Register
Auto
All local variables has this storage class.
Default value is the garbage value.
Scope of the variable is only between the blocks
where it is declared.
Lifetime is till the control remains within the block
or function where these variables are defined.
These variables are destroyed whenever block ends
or function jump occur.
To declare auto storage class auto keyword is used.
Example:
 auto int n;
Auto keyword is optional all the local variables by
default fall under this storage class.
Example:
 int n;
Extern
Scope is through out the program.
Lifetime is till the end of the program.
Initial value is 0.
Extern keyword is used to declare the variable of this
storage class.
 extern int x;
By default global variable has this storage class.
Static
It is special case of local variable.
These are defined inside the function or block.
Its scope is inside the block or the function where it
is defined.
Initial value is 0.
Its value is retained between different function calls.
Lifetime is same as the global variable i.e. through
out the program.
Keyword static is used to define this type of variable.
Register
Register variable behave in every way same as the
auto variable.
The only difference is that register variable are store
inside the computer register instead of the memory.
They are used when CPU has to access the variable
very frequently. Eg looping variable
They are defined by placing keyword register before
the datatype of variable. Example
 register int a=10;

More Related Content

What's hot

Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
Union in c language
Union  in c languageUnion  in c language
Union in c language
tanmaymodi4
 
Function in c
Function in cFunction in c
Function in c
Raj Tandukar
 
C string
C stringC string
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
tanmaymodi4
 
Space complexity
Space complexitySpace complexity
Space complexity
Bhanusree Koduru
 
Storage classes in C
Storage classes in C Storage classes in C
Storage classes in C
Self employed
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
Vineeta Garg
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
tanmaymodi4
 
Function in c
Function in cFunction in c
Function in c
savitamhaske
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
Hitesh Kumar
 
Method overloading
Method overloadingMethod overloading
Method overloading
Lovely Professional University
 
C pointer
C pointerC pointer
Literals,variables,datatype in C#
Literals,variables,datatype in C#Literals,variables,datatype in C#
Literals,variables,datatype in C#
Prasanna Kumar SM
 
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
janani thirupathi
 
File handling in c
File handling in cFile handling in c
File handling in c
aakanksha s
 
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdfSTRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
Mahender Boda
 

What's hot (20)

Function in c program
Function in c programFunction in c program
Function in c program
 
Union in c language
Union  in c languageUnion  in c language
Union in c language
 
Function in c
Function in cFunction in c
Function in c
 
C string
C stringC string
C string
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
 
Space complexity
Space complexitySpace complexity
Space complexity
 
Storage classes in C
Storage classes in C Storage classes in C
Storage classes in C
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
 
Function in c
Function in cFunction in c
Function in c
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
C pointer
C pointerC pointer
C pointer
 
Literals,variables,datatype in C#
Literals,variables,datatype in C#Literals,variables,datatype in C#
Literals,variables,datatype in C#
 
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
 
File handling in c
File handling in cFile handling in c
File handling in c
 
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdfSTRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 

Viewers also liked

Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
Nitesh Kumar Pandey
 
Array in c language
Array in c languageArray in c language
Array in c language
home
 
storage class
storage classstorage class
storage class
student
 
C and its errors
C and its errorsC and its errors
C and its errors
Junaid Raja
 
Pointers in C
Pointers in CPointers in C
Pointers in C
Kamal Acharya
 
Design Pattern Libraries
Design Pattern LibrariesDesign Pattern Libraries
Design Pattern Libraries
Brian Peppler
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
Kamal Acharya
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
Kamal Acharya
 
Network Layer
Network LayerNetwork Layer
Network Layer
Kamal Acharya
 
Memory
MemoryMemory
Loops in C
Loops in CLoops in C
Loops in C
Kamal Acharya
 
Strings in C
Strings in CStrings in C
Strings in C
Kamal Acharya
 
Loops c++
Loops c++Loops c++
Loops c++
Shivani Singh
 
File handling in C
File handling in CFile handling in C
File handling in C
Kamal Acharya
 
Structure in C
Structure in CStructure in C
Structure in C
Kamal Acharya
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
Awais Alam
 
Arrays
ArraysArrays
Array in C
Array in CArray in C
Array in C
Kamal Acharya
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programming
Rumman Ansari
 

Viewers also liked (19)

Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
 
Array in c language
Array in c languageArray in c language
Array in c language
 
storage class
storage classstorage class
storage class
 
C and its errors
C and its errorsC and its errors
C and its errors
 
Pointers in C
Pointers in CPointers in C
Pointers in C
 
Design Pattern Libraries
Design Pattern LibrariesDesign Pattern Libraries
Design Pattern Libraries
 
Recursive Function
Recursive FunctionRecursive Function
Recursive Function
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Memory
MemoryMemory
Memory
 
Loops in C
Loops in CLoops in C
Loops in C
 
Strings in C
Strings in CStrings in C
Strings in C
 
Loops c++
Loops c++Loops c++
Loops c++
 
File handling in C
File handling in CFile handling in C
File handling in C
 
Structure in C
Structure in CStructure in C
Structure in C
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
 
Arrays
ArraysArrays
Arrays
 
Array in C
Array in CArray in C
Array in C
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programming
 

Similar to Storage Class in C Progrmming

Storage classes
Storage classesStorage classes
Storage classes
priyanka jain
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
Tanmay Modi
 
Storage classes
Storage classesStorage classes
Storage classes
UTTAM VERMA
 
Latest C Interview Questions and Answers
Latest C Interview Questions and AnswersLatest C Interview Questions and Answers
Latest C Interview Questions and Answers
DaisyWatson5
 
Storage classess of C progamming
Storage classess of C progamming Storage classess of C progamming
Storage classess of C progamming
Appili Vamsi Krishna
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
Reddhi Basu
 
Storage classes
Storage classesStorage classes
Storage classes
Leela Koneru
 
Storage class
Storage classStorage class
Storage class
Kalaikumar Thangapandi
 
STORAGE CLASSES
STORAGE CLASSESSTORAGE CLASSES
STORAGE CLASSES
sathish sak
 
Storage classes
Storage classesStorage classes
Storage classes
Puneet Rajput
 
Storage classes
Storage classesStorage classes
Storage classes
Praveen M Jigajinni
 
Storage Class Specifiers
Storage Class SpecifiersStorage Class Specifiers
Storage Class Specifiers
Reddhi Basu
 
Chapter4-var.pdf
Chapter4-var.pdfChapter4-var.pdf
Chapter4-var.pdf
kumari36
 
Lecture 13 - Storage Classes
Lecture 13 - Storage ClassesLecture 13 - Storage Classes
Lecture 13 - Storage Classes
Md. Imran Hossain Showrov
 
Advanced C Programming Notes
Advanced C Programming NotesAdvanced C Programming Notes
Advanced C Programming Notes
Leslie Schulte
 
Notes of Important Programming Fundamental Questions
Notes of Important Programming Fundamental QuestionsNotes of Important Programming Fundamental Questions
Notes of Important Programming Fundamental Questions
Adeel Rasheed
 
STORAGE CLASS.pptx
STORAGE CLASS.pptxSTORAGE CLASS.pptx
STORAGE CLASS.pptx
BU210535JeevanKishor
 
Variables in java.pptx
Variables in java.pptxVariables in java.pptx
Variables in java.pptx
gomathikalai
 
C programming session7
C programming  session7C programming  session7
C programming session7
Keroles karam khalil
 
C programming session7
C programming  session7C programming  session7
C programming session7
Keroles karam khalil
 

Similar to Storage Class in C Progrmming (20)

Storage classes
Storage classesStorage classes
Storage classes
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
 
Storage classes
Storage classesStorage classes
Storage classes
 
Latest C Interview Questions and Answers
Latest C Interview Questions and AnswersLatest C Interview Questions and Answers
Latest C Interview Questions and Answers
 
Storage classess of C progamming
Storage classess of C progamming Storage classess of C progamming
Storage classess of C progamming
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
 
Storage classes
Storage classesStorage classes
Storage classes
 
Storage class
Storage classStorage class
Storage class
 
STORAGE CLASSES
STORAGE CLASSESSTORAGE CLASSES
STORAGE CLASSES
 
Storage classes
Storage classesStorage classes
Storage classes
 
Storage classes
Storage classesStorage classes
Storage classes
 
Storage Class Specifiers
Storage Class SpecifiersStorage Class Specifiers
Storage Class Specifiers
 
Chapter4-var.pdf
Chapter4-var.pdfChapter4-var.pdf
Chapter4-var.pdf
 
Lecture 13 - Storage Classes
Lecture 13 - Storage ClassesLecture 13 - Storage Classes
Lecture 13 - Storage Classes
 
Advanced C Programming Notes
Advanced C Programming NotesAdvanced C Programming Notes
Advanced C Programming Notes
 
Notes of Important Programming Fundamental Questions
Notes of Important Programming Fundamental QuestionsNotes of Important Programming Fundamental Questions
Notes of Important Programming Fundamental Questions
 
STORAGE CLASS.pptx
STORAGE CLASS.pptxSTORAGE CLASS.pptx
STORAGE CLASS.pptx
 
Variables in java.pptx
Variables in java.pptxVariables in java.pptx
Variables in java.pptx
 
C programming session7
C programming  session7C programming  session7
C programming session7
 
C programming session7
C programming  session7C programming  session7
C programming session7
 

More from Kamal Acharya

Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
Kamal Acharya
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
Kamal Acharya
 
Introduction to Computer Security
Introduction to Computer SecurityIntroduction to Computer Security
Introduction to Computer Security
Kamal Acharya
 
Session and Cookies
Session and CookiesSession and Cookies
Session and Cookies
Kamal Acharya
 
Functions in php
Functions in phpFunctions in php
Functions in php
Kamal Acharya
 
Web forms in php
Web forms in phpWeb forms in php
Web forms in php
Kamal Acharya
 
Making decision and repeating in PHP
Making decision and repeating  in PHPMaking decision and repeating  in PHP
Making decision and repeating in PHP
Kamal Acharya
 
Working with arrays in php
Working with arrays in phpWorking with arrays in php
Working with arrays in php
Kamal Acharya
 
Text and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPText and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHP
Kamal Acharya
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
Kamal Acharya
 
Capacity Planning of Data Warehousing
Capacity Planning of Data WarehousingCapacity Planning of Data Warehousing
Capacity Planning of Data Warehousing
Kamal Acharya
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
Kamal Acharya
 
Search Engines
Search EnginesSearch Engines
Search Engines
Kamal Acharya
 
Web Mining
Web MiningWeb Mining
Web Mining
Kamal Acharya
 
Information Privacy and Data Mining
Information Privacy and Data MiningInformation Privacy and Data Mining
Information Privacy and Data Mining
Kamal Acharya
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
Kamal Acharya
 
Association Analysis in Data Mining
Association Analysis in Data MiningAssociation Analysis in Data Mining
Association Analysis in Data Mining
Kamal Acharya
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
Kamal Acharya
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
Kamal Acharya
 
Introduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingIntroduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data Warehousing
Kamal Acharya
 

More from Kamal Acharya (20)

Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
 
Introduction to Computer Security
Introduction to Computer SecurityIntroduction to Computer Security
Introduction to Computer Security
 
Session and Cookies
Session and CookiesSession and Cookies
Session and Cookies
 
Functions in php
Functions in phpFunctions in php
Functions in php
 
Web forms in php
Web forms in phpWeb forms in php
Web forms in php
 
Making decision and repeating in PHP
Making decision and repeating  in PHPMaking decision and repeating  in PHP
Making decision and repeating in PHP
 
Working with arrays in php
Working with arrays in phpWorking with arrays in php
Working with arrays in php
 
Text and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPText and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Capacity Planning of Data Warehousing
Capacity Planning of Data WarehousingCapacity Planning of Data Warehousing
Capacity Planning of Data Warehousing
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
 
Search Engines
Search EnginesSearch Engines
Search Engines
 
Web Mining
Web MiningWeb Mining
Web Mining
 
Information Privacy and Data Mining
Information Privacy and Data MiningInformation Privacy and Data Mining
Information Privacy and Data Mining
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
 
Association Analysis in Data Mining
Association Analysis in Data MiningAssociation Analysis in Data Mining
Association Analysis in Data Mining
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
Introduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingIntroduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data Warehousing
 

Recently uploaded

Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
nabaegha
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
Friends of African Village Libraries
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
Infosec
 
What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17
Celine George
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
ShwetaGawande8
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
Ben Aldrich
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
MattVassar1
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
yarusun
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
Kalna College
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
Kalna College
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
Kalna College
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
khabri85
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
Derek Wenmoth
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
Frederic Fovet
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
Kalna College
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
MattVassar1
 

Recently uploaded (20)

Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
 
What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
 

Storage Class in C Progrmming

  • 2. Introduction Storage class explain the behavior of the variable in terms of scope and lifetime, it also determine the initial of the variable. Scope of the variable is the region over which the variable is visible or valid. Life time of the variable is the time during which memory is associated with the variable. Initial value is the value assigned to the variable implicitly if no value is assigned to it by the programmer.
  • 3. There are four types of storage class available in C:  Auto  Extern  Static  Register
  • 4. Auto All local variables has this storage class. Default value is the garbage value. Scope of the variable is only between the blocks where it is declared. Lifetime is till the control remains within the block or function where these variables are defined. These variables are destroyed whenever block ends or function jump occur. To declare auto storage class auto keyword is used.
  • 5. Example:  auto int n; Auto keyword is optional all the local variables by default fall under this storage class. Example:  int n;
  • 6.
  • 7. Extern Scope is through out the program. Lifetime is till the end of the program. Initial value is 0. Extern keyword is used to declare the variable of this storage class.  extern int x; By default global variable has this storage class.
  • 8.
  • 9. Static It is special case of local variable. These are defined inside the function or block. Its scope is inside the block or the function where it is defined. Initial value is 0. Its value is retained between different function calls. Lifetime is same as the global variable i.e. through out the program. Keyword static is used to define this type of variable.
  • 10.
  • 11. Register Register variable behave in every way same as the auto variable. The only difference is that register variable are store inside the computer register instead of the memory. They are used when CPU has to access the variable very frequently. Eg looping variable They are defined by placing keyword register before the datatype of variable. Example  register int a=10;
  翻译: