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
C Program for FUNCTION OF COUNT THE INTEREST float si(float,float,float); void main() {           float p=0,r=0,n=0,k=0;           clrscr();           printf("E

though the ascii is called 7-bit code. why do we use 8-bits to represent a character?

Webcam Driver static library or DLL required for Windows I want a .dll or .lib file using which i will take a snapshot from the webcam and it can't turn on the webcam LED while

write a program that counts the number of occurances of the string in the n-th padovan string p(n)

The STL details are described in many places online (see the CS377 webpage for some links), and there's a very quick introduction in Section A.14. Here are just a few additional no

Each function has its own stack frame between %fp and %sp. Let Caller calls Callee. Then Caller's %sp becomes callee's %fp, and callee's %sp set to be a new value (a smaller one be

Implement, in rPeANUt, the a Fibonacci function by using the simple recursive approach. The Fibonacci function can be implemented in c as follow: int fib(int x) {   if (x

#include "stdafx.h" #include iostream using namespace std; int _tmain(int argc, _TCHAR* argv[]) {             int NumbHold[5];             int * ptrNumb;

hi i want wite a C++ program that get one logical phrase (included {x,y,z,w,1,0}) and simplify it! but i ''m confused! thanxs for anubody help me...

What is abstraction? - Simplified view of an object in user's language is termed as abstraction. - It's the simplest, well-defined interface to an object in OO and C++ which