answersLogoWhite

0

global and static

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Can static variables be changed?

No, a static variable means that there is only one copy of that variable, and it is shared by all members of the class, or by all callers of a function.A variable that is read-only would be marked as const or final (depending on language).


If the variable flag can only be declared once in the program it was declared as what type of variable?

It's a global variable.


What are the difference between private variable and final variable?

A private variable is one that is accessible only to the current class and cannot be accessed by any other class, including the ones that extend from it. A final variable is one that cannot be modified once it is initialized and assigned a value.


How do you run c program without ideon dos?

Once the application is compiled, there is no need for an IDE.


What is the significance of the keyword 'static' in the context of programming languages?

In programming languages, the keyword 'static' is significant because it is used to declare variables or functions that retain their values throughout the program's execution. This means that the variable or function is only initialized once and its value persists across different function calls or instances of the program. This can help improve memory efficiency and program performance.


What value cannot be changed once it is initialized?

A constant value.


What is a variable whose content has a value that is read only and cannot be changed during the programs execution?

A constant variable is a variable whose value is set once and cannot be changed throughout the program's execution. Once defined, the value of a constant variable remains constant and cannot be altered.


What are final variable?

Declaring a variable with the final keyword makes it impossible to reassign a different value to that variable once it has been initialized with an explicit value (notice we said explicit rather than default). For primitives, this means that once the variable is assigned a value, the value can't be altered. For example, if you assign 10 to the int variable x, then x is going to stay 10, forever. That's pretty straightforward for primitives, but what does it mean to have a final object reference variable? A reference variable marked final can't ever be reassigned to refer to a different object. The data within the object can be modified, but the reference variable cannot be changed. In other words, if you have a final employee object variable, you can modify aspects of the employee but you cannot have the variable refer to say a manager.


What variable is unchanging?

In an experiment, your control variable will not be caused to vary by the experiment. Think of 'cause and effect'. The independent variable is the cause, the result is the effect, and the dependent variable is the one that you leave to be changed by the experiment.


What is a constant object in c plus plus?

A constant object is one that, once initialized, never changes value.


What is the uno keyword?

The "uno" keyword is used in programming languages like Java to declare a variable that can only be assigned a value once. This helps ensure that the variable's value remains constant throughout the program.


What are runtime errors in c?

A run time error occurs when a compiled program executes, and during execution, the binary code attempts a task that is not permitted by the operating system or libraries. Divide by zero is an example of a run time error. When the executed program divides one variable by a second variable, and the second variable holds a value of zero, the run time library will issue a run time error. Since the compiler cannot predict the values held by the variables, it cannot prevent such an error from occurring, and so the run time library traps the run time error during program execution. . Some run time errors include: - divide by zero - no stack space - memory reference out of bounds - write protected file