answersLogoWhite

0


Best Answer

A constant is a value that does not change, an integer is a positive whole number.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

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

What is an integer constant in c plus plus?

A constant integer is an integer that is not expected to change value while it is in scope. Declaring any variable constant doesn't guarantee it won't change, but it does make it more difficult for a programmer to change the value by accident. Constant integers must be initialised at the point of instantiation. We can initialise a constant with the value of a literal constant, the value of another constant, or the value of a variable: void f (int v) { const int x {42}; // Integer constant (initialised from literal constant) const int y {x}; // Integer constant (initialised from another constant) const int z {v}; // Integer constant (initialised from a variable) // ... v *= 2; // ok -- v is variable x *= 2; // error: x is constant }


Why do you have enumeration?

There are different methods for naming a integer constant, one such method is enumeration. Enumeration is created by using the keyword enum.


What is the significance of declaring a constant unsigned integer?

What is the significance of declaring a constant unsigned integer?


Can you use expressions in switch?

Switch Expression should be an Integer Expression.Syntax:switch(integer expression){case constant 1:do this;default:do this;}The expression following the keyword switch is any C expression that will yield an Integer value.It could be an integer constant like 1,2 or 3,or an expression that evaluates to an integer.


What are the various forms of integer constant?

int.float,double,


What is the size of character constant?

character constant is 4 bytes explanation is all constants is integer


Is it possible that the rate constant is not necessary to be integer number?

Of course.


What are 2 types of constant in c?

String constants:A string constant is a sequence of alphanumeric characters enclosed in double quotation marks whose maximum length is 256 characters. The following are some examples of valid string constants:1) "The result is ="2) "Test program 123"Numeric constants:Numeric constants are positive or negative numbers. There are four types of numeric constants: integer constant, floating point constant, hex constant and octal constant. An integer constant may either be a short integer or a long integer. A floating point constant may either be of single precision or double precision.


What is the different between constant velocity and constant speed?

constant velocity is when you maintain speed and direction, this usually is in a straight line, and constant speed means that your speed is always constant at all times.


What makes an integer different?

Each integer is different from every other integer since it represents a different quantity. Actually, this is true of every number.


Is it possible for a rational number that is not an integer but is a whole number?

No. If it is an integer then it is a whole number.


Explain different types of constant?

Integer constants Character constants Real/floating point constants String constants