Computer Science, asked by shubhichandel63, 6 months ago

Differentiate among constant , variables and keywords with suitable examples. ​

Answers

Answered by Abhinab08
1

Explanation:

Constant: A constant can be defined as a fixed value, which is used in algebraic expressions and equations. A constant does not change over time and has a fixed value. For example, the size of a shoe or cloth or any apparel will not change at any point.

In an algebraic expression, x+y = 8, 8 is a constant value, and it cannot be changed.

Variables: Variables are the terms which can change or vary over time. It does not remain constant, unlike constant. For example, the height and weight of a person do not remain constant always, and hence they are variables.

In an algebraic expression, x+y = 8, x and y are the variables and can be changed.

Let us figure out the other key differences between constants and variables.

Keywords have fixed meanings, and the meaning cannot be changed. They act as a building block of a 'C' program. There are a total of 32 keywords in 'C'. Keywords are written in lowercase letters.

Answered by NihitaGhosh
1

Answer:

I hope my answer helps you

Explanation:

The main difference between constant and variable in C programming is that a constant is similar to a variable, but it cannot be modified by the program once it is defined while a variable is a memory location that holds data. ... A variable declared to store an integer cannot be used to store a floating point value.

For example: ... (i) In 2a, 2 is a constant and a is a variable

Similar questions