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

Answers were Sorted based on User's Feedback



Types of storage and scope of each type..

Answer / 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

Types of storage and scope of each type..

Answer / p.mathiazhagan

There four types of storage is available.
1)Automatic
2)external
3)static
4)register

The first three is explained before answer...

Register variable are not using the memory. It stored
in registers. It is mainly used to fast access then
previous storage. But, It has some limitation for declaring
the variable

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the Difference between "vector" and "array"?

15 Answers   Covansys, Gambit, TCS, Wipro,


Explain the uses oof nested class?

0 Answers  


What are dynamic type checking?

0 Answers  


What does return 0 do in c++?

0 Answers  


Mention the ways in which parameterized can be invoked.

0 Answers  


What are shallow and deep copy?

0 Answers  


What is the meaning of string in c++?

0 Answers  


What are the three types of access specifiers in C++?

1 Answers  


How to write a program such that it will delete itself after exectution?

3 Answers  


Carry out conversion of one object of user-defined type to another?

0 Answers  


Describe private, protected and public – the differences and give examples.

0 Answers  


Refer to a name of class or function that is defined within a namespace?

0 Answers  


Categories