Explain Global variable

Global variable: It is a phenomenon which is more generally regarded as being a trouble in structured programming languages than in object-oriented languages. In structured programming language, like C or Pascal, a global variable is one stated outside the procedures and functions of a program. This is hard to keep track of the usage of this variable as it is readable and writable by the entire program or module in which it is stated. This makes these variables a general source of logical errors. However, instance variables pose a similar trouble within class definitions, as Java's scope rules make them available to all methods stated within a class. This is one of the reasons why we favor to channel access to instance variables via accessor and mutator techniques even in a class.

   Related Questions in Programming Languages

  • Q : Calculate the summation of 1 to some

    Write two programs to calculate the summation of 1 to some integer n using a function called int summation(int n) a) Using a non recursive solution, with a for(i=1, i<=n; i++) loop and b) using a recursive solution, based on the following conditions summation(n) = summation(n-1

  • Q : Differentiate between RDO and ADO

    Differentiate between RDO and ADO?

  • Q : Explain Interpreter Interpreter : A

    Interpreter: A program that executes a translated version of the source program by implementing a virtual machine. The interpreters usually simulate the actions of an idealized Central Processing Unit. An interpreter for Java should implement the Java

  • Q : Explain Throws clause Throws clause :

    Throws clause: It is a clause in a method header pointing that one or additional exceptions will be propagated from this technique. For example:    public int find(String s) throws NotFoundExc

  • Q : When does a name clash take place in

    When does a name clash take place in programming?

  • Q : What is a Micro-chip Micro-chip : It is

    Micro-chip: It is a small electronic device employed to build computers and other electronic equipment. The chips are generally employed to supply the memory and processing components of the computer.

  • Q : Basic Units of CSS Specify the Basic

    Specify the Basic Units of the CSS.

  • Q : Explain Timesharing system Timesharing

    Timesharing system: It is an operating system which shares processor time among multiple processes by assigning each a time slice. Once a process's time slice has finished or expired, the other procedure is given a possibility to run.

  • Q : Software Quality Assurance and Software

    What real-life experience have you gained along with Software Quality Assurance as well as Software Quality Control?

  • Q : Describe the Binders Briefly describe

    Briefly describe the Binders?

©TutorsGlobe All rights reserved 2022-2023.