Described c++ storage classes?, C/C++ Programming

A: auto: the default. Variables are created and initialized automatically while they are defined and destroyed at the ending of the block containing their definition. They are not observable outside that block.

register:  it is a type of auto variable. a recommendation to the compiler to employ a CPU register for performance.

static: a variable which is known only in the function which contains its definition but is never destroyed & retains its value among calls to that function. This present from the time the program start execution.

extern: a static variable whose placement and definition is determined while all object and library modules are combined (linked) to form the executable code file. It may be visible outside the file where it is defined.


Posted Date: 3/21/2013 7:25:30 AM | Location : United States

Related Discussions:- Described c++ storage classes?, Assignment Help, Ask Question on Described c++ storage classes?, Get Answer, Expert's Help, Described c++ storage classes? Discussions

Write discussion on Described c++ storage classes?
Your posts are moderated
Related Questions
program that counts the number of occurrences of the string in the n-th padovan string p(n)

Explain high-order and low-order bytes. - Numbers are written from left to right in decreasing order of significance. In the same way, bits in a byte of computer memory can be

Write a program called OddEven that will prompt the user for an integer and print/display a message indicating whether it is even or odd. Continue prompting for numbers from the us

Program is to reverse the names stored in an array pointer: Program is to reverse the 6 names stored in an array pointer as name[] void main()   {  clrscr();  char

Q: How can one encourage his (older) compiler to check new to see automatically if it returns NULL?       A: His compiler eventually will. If he contain an old compiler wh

write a C program for padovan string for a natural number

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.