SlideShare a Scribd company logo
Types of Storage Class Specifiers in C:
There are 4 storage class specifiers available in C language. They are,
1. auto
2. extern
3. static
4. register
S.No.
Storage
Specifier
Storage
place
Initial /
default
value
Scope Life
1 auto
CPU
Memory
Garbage
value
local
Within the function
only.
2 extern
CPU
memory
Zero Global
Till the end of the
main
program. Variable
definition might be
anywhere in the C
program
3 static
CPU
memory
Zero local
Retains the value of
the variable
between different
function calls.
4 register
Register
memory
Garbage
value
local Within the function
Note:
 For faster access of a variable, it is better to go for register specifiers rather than auto
specifiers.
 Because, register variables are stored in register memory whereas auto variables are
stored in main CPU memory.
 Only few variables can be stored in register memory. So, we can use variables as register
that are used very often in a C program.

More Related Content

What's hot (20)

PPTX
Storage class
Joy Forerver
 
PPTX
Storage classes in C
Nitesh Bichwani
 
DOC
What is storage class
Isha Aggarwal
 
PPTX
Storage Class Specifiers
Reddhi Basu
 
PPTX
Storage classes
Puneet Rajput
 
PPTX
Storage classes in c language
tanmaymodi4
 
DOCX
Notes of Important Programming Fundamental Questions
Adeel Rasheed
 
PPTX
11 lec 11 storage class
kapil078
 
PPTX
C language 2
Arafat Bin Reza
 
PPTX
FUNCTION CPU
Krushal Kakadia
 
PPTX
Storage class in C Language
Nitesh Kumar Pandey
 
PPTX
Storage classes in c++
Jaspal Singh
 
PPTX
C language
Arafat Bin Reza
 
PPT
Functions in c
SunithaVesalpu
 
PPT
Storage classes
Shanmughaneethi Velu
 
PDF
Function in C++
Prof Ansari
 
PPT
storage class
student
 
PDF
Linq & lambda overview C#.net
Dhairya Joshi
 
PDF
(3) cpp procedural programming
Nico Ludwig
 
Storage class
Joy Forerver
 
Storage classes in C
Nitesh Bichwani
 
What is storage class
Isha Aggarwal
 
Storage Class Specifiers
Reddhi Basu
 
Storage classes
Puneet Rajput
 
Storage classes in c language
tanmaymodi4
 
Notes of Important Programming Fundamental Questions
Adeel Rasheed
 
11 lec 11 storage class
kapil078
 
C language 2
Arafat Bin Reza
 
FUNCTION CPU
Krushal Kakadia
 
Storage class in C Language
Nitesh Kumar Pandey
 
Storage classes in c++
Jaspal Singh
 
C language
Arafat Bin Reza
 
Functions in c
SunithaVesalpu
 
Storage classes
Shanmughaneethi Velu
 
Function in C++
Prof Ansari
 
storage class
student
 
Linq & lambda overview C#.net
Dhairya Joshi
 
(3) cpp procedural programming
Nico Ludwig
 

Viewers also liked (20)

PPT
Pointers C programming
Appili Vamsi Krishna
 
PDF
BE Aerospace Syllabus of MIT, Anna University R2015
Appili Vamsi Krishna
 
PDF
C language for Semester Exams for Engineers
Appili Vamsi Krishna
 
PPTX
Arrays 1D and 2D , and multi dimensional
Appili Vamsi Krishna
 
PPTX
Handling of character strings C programming
Appili Vamsi Krishna
 
DOC
Difference between structure and union
Appili Vamsi Krishna
 
PPTX
Function C programming
Appili Vamsi Krishna
 
PPT
C programming for Computing Techniques
Appili Vamsi Krishna
 
PDF
Deep C Programming
Wang Hao Lee
 
PDF
Embeded microcontroler
Yugo Sulistyo
 
PPT
User defined functions in C programmig
Appili Vamsi Krishna
 
PPTX
Introduction to Basic C programming 02
Wingston
 
PPTX
Advance Microcontroller AVR
Daksh Raj Chopra
 
PPTX
Planers machine
Bilalwahla
 
PPSX
Programming ATmega microcontroller using Embedded C
Varun A M
 
PPT
AVR Fundamentals
Vinit Vyas
 
PDF
Embedded c lab and keil c manual
Hari K
 
PPTX
Embedded c
Ami Prakash
 
DOCX
Conventional machining vs. non conventional machining
onlinemetallurgy.com
 
PDF
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
Pointers C programming
Appili Vamsi Krishna
 
BE Aerospace Syllabus of MIT, Anna University R2015
Appili Vamsi Krishna
 
C language for Semester Exams for Engineers
Appili Vamsi Krishna
 
Arrays 1D and 2D , and multi dimensional
Appili Vamsi Krishna
 
Handling of character strings C programming
Appili Vamsi Krishna
 
Difference between structure and union
Appili Vamsi Krishna
 
Function C programming
Appili Vamsi Krishna
 
C programming for Computing Techniques
Appili Vamsi Krishna
 
Deep C Programming
Wang Hao Lee
 
Embeded microcontroler
Yugo Sulistyo
 
User defined functions in C programmig
Appili Vamsi Krishna
 
Introduction to Basic C programming 02
Wingston
 
Advance Microcontroller AVR
Daksh Raj Chopra
 
Planers machine
Bilalwahla
 
Programming ATmega microcontroller using Embedded C
Varun A M
 
AVR Fundamentals
Vinit Vyas
 
Embedded c lab and keil c manual
Hari K
 
Embedded c
Ami Prakash
 
Conventional machining vs. non conventional machining
onlinemetallurgy.com
 
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
Ad

Similar to Types of storage class specifiers in c programming (20)

PDF
Storage class
Kathmandu University
 
PDF
Arrays 2 Dimensional Unit 2 Part 1.pdf
Arpana Awasthi
 
PPTX
Storage classes
priyanka jain
 
PDF
Storage class
Learn By Watch
 
DOCX
Storage class
Kalaikumar Thangapandi
 
PPT
Storage classes
Praveen M Jigajinni
 
PDF
C storage classes
ArghodeepPaul
 
PDF
Understanding Storage Classes in C.pdf
SumanaDotNetTricks
 
PPTX
Storage class
MANJULA_AP
 
PPT
Storage classes
Leela Koneru
 
PPTX
Storage classes in c language
Tanmay Modi
 
PPT
Lecture 13 - Storage Classes
Md. Imran Hossain Showrov
 
PPT
Storage classes
Leela Koneru
 
PDF
Terms and Definitions.pdf
SheikhAbrarAhmad
 
PDF
Advanced C Programming Notes
Leslie Schulte
 
PPTX
STORAGE CLASS.pptx
BU210535JeevanKishor
 
PPT
cs8251 unit 1 ppt
praveenaprakasam
 
PPTX
Storage Class
JoyceAiman
 
PDF
Storage classes arrays & functions in C Language
Jenish Bhavsar
 
Storage class
Kathmandu University
 
Arrays 2 Dimensional Unit 2 Part 1.pdf
Arpana Awasthi
 
Storage classes
priyanka jain
 
Storage class
Learn By Watch
 
Storage class
Kalaikumar Thangapandi
 
Storage classes
Praveen M Jigajinni
 
C storage classes
ArghodeepPaul
 
Understanding Storage Classes in C.pdf
SumanaDotNetTricks
 
Storage class
MANJULA_AP
 
Storage classes
Leela Koneru
 
Storage classes in c language
Tanmay Modi
 
Lecture 13 - Storage Classes
Md. Imran Hossain Showrov
 
Storage classes
Leela Koneru
 
Terms and Definitions.pdf
SheikhAbrarAhmad
 
Advanced C Programming Notes
Leslie Schulte
 
STORAGE CLASS.pptx
BU210535JeevanKishor
 
cs8251 unit 1 ppt
praveenaprakasam
 
Storage Class
JoyceAiman
 
Storage classes arrays & functions in C Language
Jenish Bhavsar
 
Ad

Recently uploaded (20)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
Difference between write and update in odoo 18
Celine George
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Controller Request and Response in Odoo18
Celine George
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Introduction presentation of the patentbutler tool
MIPLM
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Horarios de distribución de agua en julio
pegazohn1978
 
Difference between write and update in odoo 18
Celine George
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
infertility, types,causes, impact, and management
Ritu480198
 

Types of storage class specifiers in c programming

  • 1. Types of Storage Class Specifiers in C: There are 4 storage class specifiers available in C language. They are, 1. auto 2. extern 3. static 4. register S.No. Storage Specifier Storage place Initial / default value Scope Life 1 auto CPU Memory Garbage value local Within the function only. 2 extern CPU memory Zero Global Till the end of the main program. Variable definition might be anywhere in the C program 3 static CPU memory Zero local Retains the value of the variable between different function calls. 4 register Register memory Garbage value local Within the function Note:  For faster access of a variable, it is better to go for register specifiers rather than auto specifiers.  Because, register variables are stored in register memory whereas auto variables are stored in main CPU memory.  Only few variables can be stored in register memory. So, we can use variables as register that are used very often in a C program.