answersLogoWhite

0

a constant remains fixed with any kind if change in variation or the quantity whearas variables vary with certain quantities

a variable is al location in a memory which holds a piece of data ,it can be represented by anything apart from numbers.whearas

a constant can be any numbers or characters

if we talk in refernce with C Language:

  • Variable is the named memory location whose value or you can say whose data can be change during execution of program. Where as Constant is the named memory location who value cann't be changed or whose value is fixed during the execution of the program.
  • Variable's syntax is : data_type variable_name; and Constant's syntax is: const data_type constant_name=value;
  • variable's example: int a; Constant's example is:const int a=28;
  • Variables can be initialize after its declaration where as constants must be initialized at the time of there deceleration otherwise they will take a garbage/junk value.
User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What do you mean by variable and constant?

A variable is a symbol or name that represents a value that can change or vary within a given context, often used in mathematical equations and programming. In contrast, a constant is a fixed value that does not change, remaining the same throughout the context in which it is used. Both concepts are fundamental in mathematics, science, and computer programming, allowing for the representation of dynamic and static quantities.


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.


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 a computer variables?

In a programming language, a variable is a name for a place where information is stored.


What is difference between variable and constant?

Whether or not you can change its value.


What are the differences of a constant and a variable?

A constant has only the exact value it's declared and can never be changed. A variable can have any number of values assigned. In programming, a variable can be given a value later in the code but can only be changed during runtime if its been declared as a pointer.


What is a variable that you need to keep the same?

A constant is a variable that needs to remain the same throughout a specific process or calculation in programming. It does not change its value once it has been defined.


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 a constant as used in C programming?

A variable of which the value cannot change. Example of its usage: const int foo = 5;


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