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

What is the difference between #import and #include?

1056


describe private access specifiers?

1241


What happens if a pointer is deleted twice?

1276


How many characters are recognized by ANSI C++?

1425


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1226


Can static member variables be private?

1184


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

1013


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1211


What is purpose of new operator?

1071


What is the use of volatile variable?

1088


What is overloading unary operator?

1092


Explain selection sorting?

1084


How the keyword struct is different from the keyword class in c++?

1043


In a function declaration what does extern means?

1054


What character terminates all character array strings a) b) . c) END

1281