<P> As the variable is an external one, there is no need to pass it as a parameter to use it in a function besides main . It belongs to every function in the module . </P> <P> The output will be: </P> <P> The use of global variables makes software harder to read and understand . Since any code anywhere in the program can change the value of the variable at any time, understanding the use of the variable may entail understanding a large portion of the program . Global variables make separating code into reusable libraries more difficult . They can lead to problems of naming because a global variable defined in one file may conflict with the same name used for a global variable in another file (thus causing linking to fail). A local variable of the same name can shield the global variable from access, again leading to harder - to - understand code . The setting of a global variable can create side effects that are hard to locate and predict . The use of global variables makes it more difficult to isolate units of code for purposes of unit testing; thus they can directly contribute to lowering the quality of the code . </P> <P> Some languages, like Java, don't have global variables . In Java, all variables that are not local variables are fields of a class . Hence all variables are in the scope of either a class or a method . In Java, static fields (also known as class variables) exist independently of any instances of the class and one copy is shared among all instances; hence public static fields are used for many of the same purposes as global variables in other languages because of their similar "sharing" behavior: </P>

Which one of the following statements is true regarding global variables