answersLogoWhite

0

What is lifetime variable?

User Avatar

Anonymous

13y ago
Updated: 8/20/2019

Nothing, but you can speak about the lifetime of a variable: the time-interval in which the variable exists.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is local variable?

they are variable that has a lifetime within that block


When do you declare a variable method and a class final?

When There is No Need to Change the Values of the Variables In Entire lifetime of That variables then we must use that Variable as Final Variable.


What is the lifetime of local variables in a function?

If the variable is local to the function it exists until the function returns.


Differences between scope and visibility of a variable?

Scope of a variable is the lines of code from which it can be seen and/or manipulated. Scope can be thought of as visibility, because a variable's scope is where it is visible from. A variable declared within a function (or any block, for that matter) has scope only within that block. It is visible within that block, and from within any contained block, but not from within any containing (outer) blocks. However, it should be noted that if a variable's name is reused in a nested declaration, then the outer variable loses scope within that block. As a result, you can reuse, for instance, the variable "i" within a new block without compromising any use outside that block.


What is meant by a static variable?

A static variable has load module lifetime. Its value persists until changed or the program exits. If the variable is at file scope, i.e. outside of any block, the word static means that it is visible only to code within that compilation unit, i.e. it can not be linked by other compilation units. In a C++ class, a static variable is common to all instances of the class.


What is the advantage of static character variable?

Static variables exist for the entire duration of the program. Therefore a static character variable is a character that exists for the entire duration the program is running. Regardless of where a static variable is declared and initialised, it is physically instantiated and initialised when the program loads. If the variable has function scope, whatever value is currently assigned to the variable will remain in effect the next time that function is called, but only the function can modify the variable. If the variable has class scope, then the variable exists even if no instances of the class have yet been instantiated, but any and all instances share the variable (it is common to the class, not to any one instance of the class). Static class variables must be initialised outwith the class body and outwith any other function body, but can only be modified by the class members (both static and non-static) and by friends of the class. If the variable has file scope, then the variable is a global variable. Global variables are largely frowned upon as there's no way to control what code can modify the value. Passing local function variables to other functions is the preferred method as this gives much greater control over which code can access and/or modify the value, as well as limiting the lifetime of the variable. To ensure the variable exists throughout a program's lifetime (as per a static variable), instantiate the variable from within the program's entry point.


What is the difference between constants and variables?

A variable is a quantity which changes its value through out the program or its lifetime. But a constant is a quantity which does not change its value through out its life time. There are 5 basic constants.


What is the variable word in english subject?

variable is the variable that variable a variable into a variable. noOb


What type of star is Eta Carinae?

Eta Carinae is a massive and highly unstable star known as a Luminous Blue Variable (LBV). It is one of the most massive and brightest stars known in the Milky Way galaxy, and it is located in the Carina constellation.


What is an independent variable dependent variable and controlled variable?

an independent variable is a thing you can change on your own. a depentent variable is a variable you depend on and a responding variable is a variable that reacts to the experiment


What is the variable called that changes in response to another variable?

The answer is a dependent variable. A variable that changes in response to another variable is called a dependent variable.


A variable that changes as a result of the other variable?

The dependent variable.