answersLogoWhite

0


Best Answer

A constant cannot be changed by the program while it is running. Furthermore, it does not take up any memory on the stack or in the heap, as it is inlined into the compiled code during the compilation process. They are used to represent unchanging data, such as the value of PI, or the date that a particular function was written. A variable is a memory location or register value that may be modified during the execution of the program, and represents data that is unknown until the program runs. Examples might include today's date, the number of times the user has logged in, or the user's preference in colors.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a variable and a constant?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between constant speed and variable speed?

The difference is that constant speed doesn't change but variable speed does. (change)


WAP to show the difference between a variable and static variable?

difference between constant and static variables in java


What the difference between a variable and control?

The difference between a controlled variable and a variable is in their state. A controlled variable is something which is rigid and constant while a variable is liable to change and inconsistent.


What is difference between variable and constant?

Whether or not you can change its value.


What is the difference between a variable and a literal in prgramming?

a literal is a constant value, the difference is a variable can change it's value.


What is the difference between control and experimental variables?

Control Variable = kept in constant in a experiment Experimental Variable = changes in a experiment


Difference between variable and constant in statistics?

When referring to statistics, variable means that numbers change and can go up and down. If something is constant, numbers remain unchanged.


What is the difference between an experimentation variable and a control variable?

In a controlled experiment, the control variable remains constant while the experimental variable changes with each trial of the experiment.


What is the difference between experimental variable and a control variable?

In a controlled experiment, the control variable remains constant while the experimental variable changes with each trial of the experiment.


What is the difference between an experimental variable and a control variable?

In a controlled experiment, the control variable remains constant while the experimental variable changes with each trial of the experiment.


What is the difference between independent variable and a constant variable?

A constant is something that will ALWAYS remain the same in your experiment. For instance, the materials you use and the unit of measurements you use are examples of constants. An independent variable changes with the experiments.


What is difference between parameter and arbitrary constant?

A parameter is a variable which takes different values and, as it does, it affects the values of some other variable or variables.