SlideShare a Scribd company logo
C             Programming
                       Language
               By:
    Yogendra Pal
yogendra@learnbywatch.com
  Dedicated to My mother and Father
Keep your notebook with you.

Write important point and questions that comes in your mind

     Solve Mind band exercise.
                                     Rewind when not clear


              Ask Questions by call or SMS or by mail


Keep Watching Keep Learning

THIS IS STORAGE CLASS
Introduction
• Variables have data types and storage classes.
• Value in a computer can be stored in
  – Memory or
  – CPU registers
• A storage class determines where to store the
  value of a variable.
Storage class
• Storage class determines     • 4 storage classes
   –   Where to store             –   Automatic
   –   Default initial value      –   Register
   –   Scope                      –   Static
   –   Life                       –   External
Automatic
• Keyword: auto
• Default storage class.
  – Where : Memory
  – Initial value : Garbage
  – Scope : Local to the block
  – Life : Till control remain within the block.
Register
• Keyword: register
• Faster access then automatic.
  –   Where : CPU registers
  –   Initial value : Garbage
  –   Scope : Local to the block
  –   Life : Till control remain within the block.
• Registers are limited.
• If no register is free compiler treat it as auto.
Static
• Keyword: static
  – Where : Memory
  – Initial value : Zero
  – Scope : Local to the block
  – Life : Persists between function calls.
• Use when really required.
External
• Keyword: extern
• Define outside of each function.
  – Where : Memory
  – Initial value : Zero
  – Scope : Global
  – Life : Till program terminates
• Use when really required.
To get complete benefit of this tutorial solve all the quiz on
                 www.learnbywatch.com

        For any problem in this tutorial mail me at
              yogendra@learnbywatch.com
                  with the subject “C”

               For Other information mail at
                 info@learnbywatch.com

More Related Content

Similar to Storage class

Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and PerformanceWSO2
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
Qspiders - Software Testing Training Institute
 
HTTP cache: keeping it fresh
HTTP cache: keeping it freshHTTP cache: keeping it fresh
HTTP cache: keeping it fresh
David de Boer
 
Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1
introtojava
 
Proctor AP Language Exams using Audacity and DiLL
Proctor AP Language Exams using Audacity and DiLLProctor AP Language Exams using Audacity and DiLL
Proctor AP Language Exams using Audacity and DiLL
Swift Education Systems
 
Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...
Danny Mulligan
 
Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)
Martijn Verburg
 
General Programming Concept
General Programming ConceptGeneral Programming Concept
General Programming Concept
Haris Bin Zahid
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
MUNAZARAZZAQELEA
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
MUNAZARAZZAQELEA
 
Number of Computer Languages = 3
Number of Computer Languages = 3Number of Computer Languages = 3
Number of Computer Languages = 3
Ram Sekhar
 
02D-Memory Management in Java.pptx
02D-Memory Management in Java.pptx02D-Memory Management in Java.pptx
02D-Memory Management in Java.pptx
AnhNhatNguyen5
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
Sam Bowne
 
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
Mary Chan
 
openmp.New.intro-unc.edu.ppt
openmp.New.intro-unc.edu.pptopenmp.New.intro-unc.edu.ppt
openmp.New.intro-unc.edu.ppt
MALARMANNANA1
 
Code retreat @BMW Car IT
Code retreat @BMW Car ITCode retreat @BMW Car IT
Code retreat @BMW Car IT
Sebastian Benz
 
CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45
Bilal Ahmed
 
Java in High Frequency Trading
Java in High Frequency TradingJava in High Frequency Trading
Java in High Frequency Trading
Viktor Sovietov
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
shashi shekhar
 

Similar to Storage class (20)

Application Profiling for Memory and Performance
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
 
QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)QSpiders - Memory (JVM architecture)
QSpiders - Memory (JVM architecture)
 
HTTP cache: keeping it fresh
HTTP cache: keeping it freshHTTP cache: keeping it fresh
HTTP cache: keeping it fresh
 
Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1Intro To Java Alpharetta Meetup Day-1
Intro To Java Alpharetta Meetup Day-1
 
Proctor AP Language Exams using Audacity and DiLL
Proctor AP Language Exams using Audacity and DiLLProctor AP Language Exams using Audacity and DiLL
Proctor AP Language Exams using Audacity and DiLL
 
Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...
 
Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)Modern Java Concurrency (OSCON 2012)
Modern Java Concurrency (OSCON 2012)
 
General Programming Concept
General Programming ConceptGeneral Programming Concept
General Programming Concept
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
 
Gpgpu intro
Gpgpu introGpgpu intro
Gpgpu intro
 
Number of Computer Languages = 3
Number of Computer Languages = 3Number of Computer Languages = 3
Number of Computer Languages = 3
 
02D-Memory Management in Java.pptx
02D-Memory Management in Java.pptx02D-Memory Management in Java.pptx
02D-Memory Management in Java.pptx
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
 
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
Session - Debugging memory stomps and other atrocities - Stefan Reinalter - T...
 
openmp.New.intro-unc.edu.ppt
openmp.New.intro-unc.edu.pptopenmp.New.intro-unc.edu.ppt
openmp.New.intro-unc.edu.ppt
 
Code retreat @BMW Car IT
Code retreat @BMW Car ITCode retreat @BMW Car IT
Code retreat @BMW Car IT
 
CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45CS101- Introduction to Computing- Lecture 45
CS101- Introduction to Computing- Lecture 45
 
Java in High Frequency Trading
Java in High Frequency TradingJava in High Frequency Trading
Java in High Frequency Trading
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 

More from Learn By Watch

Tutorial 9 fm
Tutorial 9 fmTutorial 9 fm
Tutorial 9 fm
Learn By Watch
 
Phase modulation
Phase modulationPhase modulation
Phase modulation
Learn By Watch
 
Demodulation of fm pll detector
Demodulation of fm pll detectorDemodulation of fm pll detector
Demodulation of fm pll detector
Learn By Watch
 
Demodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detectorDemodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detector
Learn By Watch
 
In direct method of fm generation armstrong method
In direct method of fm generation armstrong methodIn direct method of fm generation armstrong method
In direct method of fm generation armstrong method
Learn By Watch
 
Direct method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator methodDirect method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator method
Learn By Watch
 
Carson's rule
Carson's ruleCarson's rule
Carson's rule
Learn By Watch
 
Spectrum and power of wbfm
Spectrum and power of wbfmSpectrum and power of wbfm
Spectrum and power of wbfm
Learn By Watch
 
Narrow band frequency modulation nbfm
Narrow band frequency modulation nbfmNarrow band frequency modulation nbfm
Narrow band frequency modulation nbfm
Learn By Watch
 
General expression of fm signal
General expression of fm signalGeneral expression of fm signal
General expression of fm signal
Learn By Watch
 
Angle modulation
Angle modulationAngle modulation
Angle modulation
Learn By Watch
 
Frequency division multiplexing
Frequency division multiplexingFrequency division multiplexing
Frequency division multiplexing
Learn By Watch
 
Vsb modulation
Vsb modulationVsb modulation
Vsb modulation
Learn By Watch
 
Demodulation of ssb synchronous detector
Demodulation of ssb synchronous detectorDemodulation of ssb synchronous detector
Demodulation of ssb synchronous detector
Learn By Watch
 
Generarion of ssb phase discrimination method
Generarion of ssb phase discrimination methodGenerarion of ssb phase discrimination method
Generarion of ssb phase discrimination method
Learn By Watch
 
Generarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination methodGenerarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination method
Learn By Watch
 
Ssb modulation
Ssb modulationSsb modulation
Ssb modulation
Learn By Watch
 
Demodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiverDemodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiver
Learn By Watch
 
Quadrature carrier multiplexing qam
Quadrature carrier multiplexing qamQuadrature carrier multiplexing qam
Quadrature carrier multiplexing qam
Learn By Watch
 
Demodulation of am synchronous detector
Demodulation of am synchronous detectorDemodulation of am synchronous detector
Demodulation of am synchronous detector
Learn By Watch
 

More from Learn By Watch (20)

Tutorial 9 fm
Tutorial 9 fmTutorial 9 fm
Tutorial 9 fm
 
Phase modulation
Phase modulationPhase modulation
Phase modulation
 
Demodulation of fm pll detector
Demodulation of fm pll detectorDemodulation of fm pll detector
Demodulation of fm pll detector
 
Demodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detectorDemodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detector
 
In direct method of fm generation armstrong method
In direct method of fm generation armstrong methodIn direct method of fm generation armstrong method
In direct method of fm generation armstrong method
 
Direct method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator methodDirect method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator method
 
Carson's rule
Carson's ruleCarson's rule
Carson's rule
 
Spectrum and power of wbfm
Spectrum and power of wbfmSpectrum and power of wbfm
Spectrum and power of wbfm
 
Narrow band frequency modulation nbfm
Narrow band frequency modulation nbfmNarrow band frequency modulation nbfm
Narrow band frequency modulation nbfm
 
General expression of fm signal
General expression of fm signalGeneral expression of fm signal
General expression of fm signal
 
Angle modulation
Angle modulationAngle modulation
Angle modulation
 
Frequency division multiplexing
Frequency division multiplexingFrequency division multiplexing
Frequency division multiplexing
 
Vsb modulation
Vsb modulationVsb modulation
Vsb modulation
 
Demodulation of ssb synchronous detector
Demodulation of ssb synchronous detectorDemodulation of ssb synchronous detector
Demodulation of ssb synchronous detector
 
Generarion of ssb phase discrimination method
Generarion of ssb phase discrimination methodGenerarion of ssb phase discrimination method
Generarion of ssb phase discrimination method
 
Generarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination methodGenerarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination method
 
Ssb modulation
Ssb modulationSsb modulation
Ssb modulation
 
Demodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiverDemodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiver
 
Quadrature carrier multiplexing qam
Quadrature carrier multiplexing qamQuadrature carrier multiplexing qam
Quadrature carrier multiplexing qam
 
Demodulation of am synchronous detector
Demodulation of am synchronous detectorDemodulation of am synchronous detector
Demodulation of am synchronous detector
 

Recently uploaded

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
kitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptxkitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptx
datarid22
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
kitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptxkitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptx
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Storage class

  • 1. C Programming Language By: Yogendra Pal yogendra@learnbywatch.com Dedicated to My mother and Father
  • 2. Keep your notebook with you. Write important point and questions that comes in your mind Solve Mind band exercise. Rewind when not clear Ask Questions by call or SMS or by mail Keep Watching Keep Learning THIS IS STORAGE CLASS
  • 3. Introduction • Variables have data types and storage classes. • Value in a computer can be stored in – Memory or – CPU registers • A storage class determines where to store the value of a variable.
  • 4. Storage class • Storage class determines • 4 storage classes – Where to store – Automatic – Default initial value – Register – Scope – Static – Life – External
  • 5. Automatic • Keyword: auto • Default storage class. – Where : Memory – Initial value : Garbage – Scope : Local to the block – Life : Till control remain within the block.
  • 6. Register • Keyword: register • Faster access then automatic. – Where : CPU registers – Initial value : Garbage – Scope : Local to the block – Life : Till control remain within the block. • Registers are limited. • If no register is free compiler treat it as auto.
  • 7. Static • Keyword: static – Where : Memory – Initial value : Zero – Scope : Local to the block – Life : Persists between function calls. • Use when really required.
  • 8. External • Keyword: extern • Define outside of each function. – Where : Memory – Initial value : Zero – Scope : Global – Life : Till program terminates • Use when really required.
  • 9. To get complete benefit of this tutorial solve all the quiz on www.learnbywatch.com For any problem in this tutorial mail me at yogendra@learnbywatch.com with the subject “C” For Other information mail at info@learnbywatch.com