answersLogoWhite

0

Either a case of bad programming practise or probably the function calls itself.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

How do you access global variable from within the main function when the local variable is of the same name?

When you acess a global variable inside main function you must use the same name, because the variable declared as global can be accessed by any function/procedure on the class where it was defined.


Why all variables are declared with in the function?

It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.


What is a javascript variable?

A variable in JavaScript is an identifier that provides a storage location used to store a data value. The data stored at a particular location in memory. That we accessed by using the variable name. In JavaScript programs, a script will have to store the bits of information temporarily. It needs to do its work. It can store this data in variables. In other words, A variable is a symbolic name given to a location in the computer memory. Where we store the value, which can be used in the program. The value of the variable can change during the execution of the program. It may take different values at different times during the execution of the program. The name of the variable that we choose must be meaningful to understand, what it represents in the program. For example var Price = 100; Rules to follow: The name of the variable can contain a letter, digits, underscore(_), and dollar sign($). They must begin with a letter, not with a digit. Uppercase and Lowercase are distinct. That means the variable Total is not the same as total or TOTAl. It should not be a keyword. White space does also not allow. Variable can be any length. Hope this helps. Thank you


What is micro and how it is different from c variable name?

A macro is a variable that has a constant value throughout the program whereas a C variable is an identifier whose value can differ from function to function, it can be incremented or decremented whereas the value of a macro remains same .


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.

Related Questions

How do you access global variable from within the main function when the local variable is of the same name?

When you acess a global variable inside main function you must use the same name, because the variable declared as global can be accessed by any function/procedure on the class where it was defined.


Why all variables are declared with in the function?

It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.


What is a javascript variable?

A variable in JavaScript is an identifier that provides a storage location used to store a data value. The data stored at a particular location in memory. That we accessed by using the variable name. In JavaScript programs, a script will have to store the bits of information temporarily. It needs to do its work. It can store this data in variables. In other words, A variable is a symbolic name given to a location in the computer memory. Where we store the value, which can be used in the program. The value of the variable can change during the execution of the program. It may take different values at different times during the execution of the program. The name of the variable that we choose must be meaningful to understand, what it represents in the program. For example var Price = 100; Rules to follow: The name of the variable can contain a letter, digits, underscore(_), and dollar sign($). They must begin with a letter, not with a digit. Uppercase and Lowercase are distinct. That means the variable Total is not the same as total or TOTAl. It should not be a keyword. White space does also not allow. Variable can be any length. Hope this helps. Thank you


What is micro and how it is different from c variable name?

A macro is a variable that has a constant value throughout the program whereas a C variable is an identifier whose value can differ from function to function, it can be incremented or decremented whereas the value of a macro remains same .


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 differences between JavaScript and livescript?

JavaScript is LiveScript. It was renamed to gain popularity. The JavaScript name was rejected by then Sun Microsystems who owned the Java trademark. Now the official name is ECMAScript, while it is still commonly referred to as JavaScript. In Internet Explorer it is called JScript. Different names, same language.


In order for a function to be one-to-one no two independent variable values may yield the same value of the dependent variable?

True


Is -7 a function?

Any number can be considered a function - a constant function, to be more precise. That is, the value of the function is the same for all values of "x" or whatever you call your independent variable or variables.


What is the name of the variable that stays the same?

A constant is a variable that doesn't change in value throughout the program's execution.


How do you clear a variable in PHP?

You can unset a variable in PHP by setting it to NULL. You can set a variable to NULL by declaring it normally, or using the function "unset()". Both methods are acceptable, and accomplish the same thing. Examples of both: ---- $variable = NULL; ---- unset($variable); ----


What is the greatest number of x intercepts that a function may have?

The same number as the highest power of the independent variable.


What is completing the square used for?

Completing the square is a method used to solve a quadratic function. This is a handy method when there are two instances of the same variable in the function.