answersLogoWhite

0


Best Answer

In most languages this is called a constant.

***edit***

Ty for the answer, I just wanted to throw in the page number for ITT-Tech students.

named constant

page 62

Programming Logic and Design by Tony Gladdis

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A what variable has a value that is read only and cannot be changed during the programs execution?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Difference Between Variable And constant?

A constant and variable are variations of data types. int a; is a variable and its value can be changed by the program as the program runs. const int b; is a constant with a fixed value and will have its value set and may not be changed by the program as as the program runs. All data types may be declared as a constant. Variable Value Can Be Changed By You In Programme.


Is it necessary to initialize the const variable in c?

A constant variable cannot have its value changed at program run time.


How can you change the value of a constant variable in C?

You can change a static variable by putting the static variable into a function that has operations that you intend to execute upon the variable. Example, you want to change the static variable to another value or make an addition of 2. Put the source code inside a function with the static variable declared locally within the function.Every time you call the function, the static variable value will change. Take note that the static variable retains the last value you declared it in your function call.A more terse answerLocal variables declared as static are changed as normal; they are special in that their values persist across function calls.


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).


What is mean final class and final variable?

A final variable cannot have its value changed. It is used to define a constant. Assigning a value to a final variable after it is declared will cause a compiler error. A final class cannot be sub-classed. It is used to prevent rogue programmers from sub-classing your classes and changing their behavior. Trying to extend a final class will cause a compiler error.

Related questions

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

named constant


Difference between variable and constants in visual basic?

"Memory locations that hold data that can be changed during project execution are called variables; locations that hold data that cannot change during execution are called constants"


Can a controlled variable be changed during an experiment?

No it cannot be changed in an expirement


Difference Between Variable And constant?

A constant and variable are variations of data types. int a; is a variable and its value can be changed by the program as the program runs. const int b; is a constant with a fixed value and will have its value set and may not be changed by the program as as the program runs. All data types may be declared as a constant. Variable Value Can Be Changed By You In Programme.


WHAT IS THE name that represents a value that cannot be changed during the program's executiON?

A Name Constant


In what way can we use variables?

A variable is used purely for the purpose of storing a single value. Being variable, the value can be changed at any time. A constant is the opposite of a variable; its value cannot be changed.


Is it necessary to initialize the const variable in c?

A constant variable cannot have its value changed at program run time.


What is the constant of the variable?

The definition of constant variable is a variable whose value cannot be changed once it has been assigned a value for an experiment. It is the variable held steady, or constant, for a specific experiment.


What variable is the part of the experiment that is being tested or the part that is changed by the person doing th experiment is called?

There Is Independent Which can Be Changed and Dependent That Cannot Be Changed.


Differentiate between C Constants and C variables?

A constant value cannot be changed once set. A variable can be changed whenever you want.


How can you change the value of a constant variable in C?

You can change a static variable by putting the static variable into a function that has operations that you intend to execute upon the variable. Example, you want to change the static variable to another value or make an addition of 2. Put the source code inside a function with the static variable declared locally within the function.Every time you call the function, the static variable value will change. Take note that the static variable retains the last value you declared it in your function call.A more terse answerLocal variables declared as static are changed as normal; they are special in that their values persist across function calls.


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).