answersLogoWhite

0

How much data can a global variable contain?

Updated: 8/20/2019
User Avatar

Wiki User

10y ago

Best Answer

This question is meaningless. 'Variable' is not a type, and scope does not determine how much 'data' something can store.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How much data can a global variable contain?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How much data are store in stack?

Variable, zero or more.


How much alcohol does a beer contain?

It is highly variable from time and place but tends to be about 5%.


What is the manipulated variable in coke and Mentos project?

the independent variable is how much sugars the crystals contain


How much data can a typical frame contain?

1500 bytes


Why are troubleshooter bugs more difficult with global variables?

Global variables are accessible to any code making it much more difficult to determine when and where a global is being modified. They can also lead to data-races whenever two threads try to write to the same global at the same time, or one tries to read the global while another is modifying it. The more complex the global the greater the risk. Globals are not necessarily bad provided they are thread-safe and genuinely represent a truly global concept. If not, use a local variable instead.


What are the advantages of a global variable?

The only advantage of a global variable is when you wish to represent something that is truly global. A global variable is, by definition, a variable that can be used by any function without having to pass that variable through a function argument. A good example of a global variable is the standard console output device (std::cout) in C++. Not all functions need to present output through std::cout, but it is useful to know that the device is always accessible should we need it. That is, when we want a function to present output, we don't have to instantiate a new device to do so, we can simply use the one that is readily available to us. And since there can only ever be one physical standard output device, it is a global device in every sense of the word. The problem with global variables is that it is all too easy to get into the habit of declaring them when the variable does not represent a global concept. The convenience of being able to access a global from any function certainly has its uses, but code is always much easier to read and maintain when variables have a clearly-defined locality. For instance, if we have a dozen functions that operate upon a particular variable, it makes more sense to package those functions and the variable together into a self-contained class, where the variable is private to the class rather than globally accessible. If we declare the variable and the functions static members of the class, then we can be certain that there will only ever be one instance of the variable. Thus we get all the advantages of a global without the risk of exposing that variable to external code. If code needs to examine the variable, then we can provide a public read-only accessor for that purpose.


What is the difference between datatype and keyword in c?

data type refers to the kind of value that is held by a particular variable. For ex: an int variable contains integer value, a string holds a alpha numeric value etc. variable refers to the name of a value using which we can refer to this value. Ex: public int age = 28; here int is the data type and age is the variable.


Statistics may be regarded as the study of the method of the reduction of the data?

Statistics provides uni-variate/multivariate techniques for data reduction. When a data-set is considered for study, it might begin with a lot of variables that influence or have significant information about the study variable (dependent variable). So it becomes difficult for the researcher to analyse every variable. In such cases, techniques like principal component analysis, discriminant analysis, factor analysis etc., are used to reduce the dimension of the data in terms of the number of factors (variables) that significantly explains the study variable. The factors that shows more variance is retained and others are dropped from the analysis. The primary aim of such techniques is to get as much of information as possible about the study variable from a limited number of factors.


What is 320vbr?

320 VBR probably indicates "320 kbps" (how much data per second, on average) and "variable bit rate" (ability to earmark more data for more complex parts of the audio or video file, and less data for less-complex parts).


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

First, lets speak about the scope of a variable. The scope of a variable is the section of the application that can see and manipulate that variable. If the variable is declared in a procedure when that procedure is called, only that procedure can use that variable. Hence that variable is considered "Local". Now Static. Static variables are variables that are created with the static key word as in:- function ab(var1 as integer)as integer static iTotal as integer itotal =iTotal + var1 (rest of ccode goes here) end function Now when this function is called the first time, iTotal will be assigned the value of var1. The next time the function is called, iTotal will retain the previous value and the new value of var1 will be added to it. Hope this helps. (theTeacha) Static variables life time is not under any scope.It initializes only one time from creation to delete.let me explain by a pgm. void main() { int a=1; static s=1; int k=0; for(k=0;k<1;k++) { i++; s++; main(); } printf("%d is i",&i); printf(%d is S",&s); getch(); } Output will be 2 is i 3 is s It Shows that local variable initialize every time the function call.But Static variable initializes only once <><><> For a variable, static means it keeps its value even when the enclosing code is not active--out of scope. A static variable is assigned to a fixed memory location when the program runs, so it is possible to examine a static variable at any time the program is active, even when the function where the var is declared is not active. A local variable is dynamically allocated storage space when a function is called, and its storage is given up when the function ends, so it only exists while the function is executing. For a function, static declaration means it can only be called from functions in the same file (in C).


What happens when more than one variable in an experiment is changed at a time?

Because you want to see how the experimental results change due to only that one variable change. If you used two variables, and the results varied, how would you know which variable contributed more to the change if at all? It can be done this way, but one variable at a time will allow you to make sense of your data much more efficiently.


What are features of a data set?

There are a number of features that define a data set. The main ones include sharing same spatial reference, having a uniformed coordinate information, each table represents a specific variable and so much more.