Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Types of storage and scope of each type

Answer Posted / mike

Types of storage class variables in C++:
Automatic.
Extern.
static.

Automatic variables are those which are local to a function
and which are created when the function is called and
destroyed when the function is exited. The memory is
allocated and deallocated on the stack as and when the
function is called and exited.

External variables are global variables and are accessible
to all the functions in the program. They exist throughout
the program.Memory is set when they have have been declared
and will remain till the end of the program.

Static variables are like external varibles which will be
declared within a function and will maintain their values
between function calls.They also exist until throughout the
program

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a note about the virtual member function?

1006


What are enumerations?

1051


Write about the access privileges in c++ and also mention about its default access level?

1007


Explain storage qualifiers in c++.

1029


What is a .h file c++?

990


Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be

1359


How compile and run c++ program in turbo c++?

1113


What is the role of copy constructor in copying of thrown objects?

1004


Why we use #include conio h in c++?

992


which operator is used for performing an exponential operation a) > b) ^ c) none

986


How do you write a function that can reverse a linked-list?

1052


Is c++ a high level language?

945


What is called array?

1018


What is the use of data hiding?

971


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

1004