answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

A constant is a symbol that cannot be modified by the program while it is running, while a variable is a symbol that can be modified by the program while it is running. Constants are usually optimized as inline values, while variables will be stored on the stack or the heap.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

A constant is a term used in java whose values doesn't change during the execution of the program, while, a variable's value can be changed during the execution.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference Between Variable And constant
Write your answer...
Submit
Still have questions?
magnify glass
imp
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 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 difference between variable and constant?

Whether or not you can change its 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 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.


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 difference between constant speed and variable speed?

Constant speed refers to a consistent rate of motion without fluctuations, while variable speed involves changing rates of motion over time. In constant speed, the object moves at a steady pace throughout, whereas in variable speed, the object may accelerate or decelerate at different points.