answersLogoWhite

0

What is local variable?

Updated: 8/16/2019
User Avatar

Wiki User

12y ago

Best Answer

they are variable that has a lifetime within that block

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is local variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a local variable and What statements are able to access a local variable?

A local variable is a variable that can only be called on by the module. Where as a global variable can be called upon by any module. Only statements made inside the same module can call on a local variable.


Is a global variable a non-local variable?

True, a variable cannot be both global and local. But if a global and a local variable share the same name, the local one will hide the global.


local?

local variable


What is the difference between a static variable a global variable and a local variable?

A static variable is a variable allocated in static storage. A local variable is a variable declared inside a function. A global variable is a variable declared outside of any class or function. Note that local variables and global variables can both be allocated in static storage.


How you can declare local variable?

variable exit within a function and curly braces is local variable int main() { int x; }


How are the automatic variable also known as?

local variable


How can you declare global and local variable in pseudocode?

A local variable is a variable declared inside a construct, such as a class or function, while a global variable is a variable declared outside of any construct.


What happens to the value of a local variable when the module in which the variable is declared completes execution and control is passed to a different module?

The local variable goes away and the value is lost.


How are global variable different from local variable in Visual BASIC?

A global variable is available for use throughout the program. It is normally declared outside any procedure. A local variable is only available for use in the procedure it was declared in. Most variables are local, but there will be occasions when you want different procedures to be able to use the same variable. This is when you use a global variable.


What is Variable Shadowing in Java?

In Java, there are three kinds of variables: local variables, instance variables, and class variables. Variables have their scopes. Different kinds of variables have different scopes. A variable is shadowed if there is another variable with the same name that is closer in scope. In other words, referring to the variable by name will use the one closest in scope, the one in the outer scope is shadowed.A Local Variable Shadows An Instance VariableInside a class method, when a local variable have the same name as one of the instance variable, the local variable shadows the instance variable inside the method block.


A variable that is declared inside a method is called variable?

It is called a local variable since it only exists inside the method.


What are local variables in Visual BASIC?

A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.A local variable is only available for use in the procedure it was declared in. Most variables are local. Once the procedure ends, the variable is lost, but as the procedure has done its job, that is not a problem. The opposite is a global variable which is declared outside all procedures and is available for use by any of them.