answersLogoWhite

0

Global variables can have any value, in C they are aumaticatically initialized to zero.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

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.


What is jiffies?

Jiffies is a global variable that holds the number of ticks that have occured after the system has booted. On each timer interrupt the value of this variable is increased by 1.


What is difference between Static and Global variable?

Static may be local of global -local static variable is limited to the function scope. and retain it's value when function is been called . compiler differentiate static variables with a prefix function name while dealing with same name static variable in different functions. - Global static variable is visible to all the function defined in the file and retain it value but it cannot be used outside this file. now Global Variable --- this variable is also visible to all of the functions inside the file but also can be used outside the file via extern keyword.


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 modify an integer variable value in a function?

with an assignment: variable = value variable += value variable /= -3; ...


What is Variable Scope?

The scope of a variable is the range, or area, in which a variable exists. // this c is global and can be referenced from anywhere int c = 1; void foo() { // this c is local to function foo and can't be referenced from the outside int c = 2; } void bar() { // if we try to reference c here, we get the value 1 from the global variable }


Variable is the value whose value depends upon the value of the independent variable?

The dependent variable is the variable that depends on the independent variable.


How do I plug in a variable?

You cannot plug in a variable, what you do is plug in the value for a variable. If you know the value of the variable in an equation (or formula), the process of replacing that variable whenever it appears in the equation by its value is called plugging in the value for the variable.


How do you call global variable value in main method if main method contains same variable holds another value?

we can call global variables in main method by using scope resolution operator(::) if local and global have same name for example int x=10; main() { int x=20; cout<<x; //x=20 cout<<::x; //x=10 }


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 is a variable expression that has a decreasing value as the value of the variable increases?

what is a variable expression that has a decreasing value as the value of thevariable increases?


Why static variables in a function have global extent?

A variable declared static outside of a function has a scope the of the source file only. It is not a global variable. A variable declared outside of a function and without the static qualifier would be a global variable.