UrbanPro
true

Learn C++ Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Variables and Storage Classes

Darpan Kumar
18/05/2017 0 0

Variables and Storage Classes 

auto

  • default variable type
  • local to a function 

static

  • retains the values between function calls
  • initialized only once
  • unavailable outside the scope of the function 

extern

  • extern keyword tells the compiler that a variable (or function) exists, even if the compiler has not seen it in the file currently being compiled
  • forces external linkage 

volatile

  • volatile keyword prevents the compiler from performing any optimization based on the stability of that variable
  • value of a volatile variable is always read whenever its value is required 

register

  • variables are accessed faster
  • often placed in register
  • address of a register variable cannot be taken or computed i.e. the unary address-of operator (&) cannot be used with register arrays
  • register keyword cannot be used with arrays
0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Object Oriented Programing
Object Oriented Programming Concepts: Object Oriented Programming follows bottom up approach in program design and emphasizes on safety and security of data. Features Of Object Oriented Programming: Inheritance: ...

Why Indexing Should Start From Zero In Array ?
Why numbering should start at zero? To denote the subsequence of natural numbers 2, 3, ..., 12 without the pernicious three dots, fourconventions are open to usa) 2 ≤ i < 13b) 1 < i ≤ 12c)...

Why do pointers have a datatype?
Before we start with pointers you must know what is a variable and a datatype. int a; This is the basic line in every program in 'C' . It means that we are asking the compiler to give us 2 bytes of space...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...
X

Looking for C++ Language Classes?

The best tutors for C++ Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C++ Language with the Best Tutors

The best Tutors for C++ Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more