answersLogoWhite

0

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

12y ago

What else can I help you with?

Related Questions

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.


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


What is the difference between a coefficient and variable?

A variable is a part of a term which can change. A coefficient is a numerical constant, associated with a variable. For example, in the term 3x^2 , 3 is the coefficient, while x is a variable.


What is the relationship between a variable and a constant?

By definition:a variable varies (changes) in valuea constant is constant (fixed) in value