answersLogoWhite

0

Storage classes are used to indicate duration and scope of a variable or identifier. Duration indicates the life span of a variable. Scope indicates the visibility of the variable. The static storage class is used to declare an identifier that is a local variable either to a function or a file and that exists and retains its value after control passes from where it was declared. This storage class has a duration that is permanent. A variable declared of this class retains its value from one call of the function to the next. The scope is local. A variable is known only by the function it is declared within or if declared globally in a file, it is known or seen only by the functions within that file. This storage class guarantees that declaration of the variable also initializes the variable to zero or all bits off. The extern storage class is used to declare a global variable that will be known to the functions in a file and capable of being known to all functions in a program. This storage class has a duration that is permanent. Any variable of this class retains its value until changed by another assignment. The scope is global. A variable can be known or seen by all functions within a program.

User Avatar

Wiki User

20y ago

What else can I help you with?

Related Questions

What is meant by the storage class of a variable?

auto, extern, static, register, typedef (only formally)


Auto static extern register?

Storage classes.


What is storage classes in c plus plus?

AUTO EXTERN STATIC are the storage classes in c++


How i useStatic extern int a in c?

No such thing, pick one ot the three: static int x; extern int x; int x;


What are the storage classes in c?

A storage class defines the visibility and lifetime of variables or/and functions within a C Program. There are following storage classes which can be used in a C Program: auto register static extern


What is different storage class in c?

Different from what? Storage classes are auto, register, static, extern and typedef (formally).


How java use extern key word which is used in C plus plus?

No extern keyword in Java.


Why inline functions shall not be defined with extern or static storage class?

inline itself should be considered as a storage class


What are the modofier in turbo C?

You can use every standard C modifier in TurboC: long, short, signed, unsigned; and every storage class as well: static, extern, auto, register, typedef.


What is extern C used for?

extern specifies that the variable is in another file.say you have a variable(int k = 10) in mycpp1.cpp and you want to use it in mycpp2.cpp use the extern to redeclare the variable and use it.Example:Code://mycpp1.cppint k = 10;Code://mycpp2.cppextern int k;void function(void){cout


What does extern C stand for?

"extern" is short of "external" which means outside.


Describe about storage allocation and scope of global extern static local and register variables?

Global Varible: The variable which is declared as "Global" one : having the preveleges to use and access that variable in any class and object( means any where in the program) just like PUBLIC keyword in OOPS concepts. Static Variable : If we declare a variable as Static , then it wont have the permission to access that variable through out the program and u have to use it inside the class or object which u declared itself. All the Best Annapurna

Trending Questions
Is transfer of genes from plants to animals is possible? What is true about current it is related to voltage and resistance by ohms law it is the flow of electric charges it is the excess accumulation of electric charge? When several light bulbs are connected in a series circuit what will happen if on bulb burns out? Write a program in c language to reverse elements of a queue? How many shovels in a bag of cement? When you're measuring a power supply's voltage over time. You want to know how much the voltage changes during that period of time. What feature of a digital vom can be used to monitor this? Is there a theoretical limit to high voltage? What is an advantage of using a linked style sheet? Can the same components of a circuit be rearranged in different combinations? What is weld fault? What is the difference between binary file and executable file? What is function overriding in C plus plus? What is the value of resistance ot coil having impedance of 50ohm connected across 240v at 0.8 p.f? How do you write a program to convert 99 to its hexadecimal number? The work done in lifting 30kg of bricks to a height of 20m on a building under construction is? What is the distance of vent from trap seal? Is there a building material called PUMIS? How do you test a closed circuit? Is Coromandal king 53 grade cement use for m40 grade concrete? Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?