What are variables?
Ans. Variable is the name of an identifier assigned to a memory location which holds a value. Variable is an entity that may change.
Rules for declaring a variable :
1] Variables should be declared using alphabets or underscores at the start, but not with the numbers.
eg's : variable1, variable2, a1, a_2, _variable.
Variables should not be declared in this format : eg's : 1variable, 1aa, 2_variable.
2] For using space in declaring a variable name, we can use the underscore ( _ ) sign.
What are constants?
Ans. Constant is an entity that does not change throughtout the code. Constant is the fixed value that does'nt change.
Types of C Constants : 1] Primary constants.
2] Secondary constants.
1] Primary constants : Real constants, Integer constants, Character constants.
2] Secondary constants : Pointer, Array, Enum, Union, Structure.
Rules for declaring/constructing a constant?
An integer constant must have at least one digit.
An integer constant can be positive or negative.
An integer constant is assumed to be positive is there is no sign represented.
An integer constant does not contain decimal point.
An integer constant does not contain any commas or spaces.
examples: 323, 123, 288, -77,-921.
An real constant must have at least one digit.
An real constant should have a decimal point.
An real constant can be positive or negative.
An real constant cannot contain blanks or commas.
An real constant is assumed positive is no sign is represented.
examples: -22.12, 879.12, -83.1, 882.212.
An character constant should be a single digit value represented by inverted commas tending to the left side.
eg: 'B'
It can contain a single special symbol too.
It should not be contsructed as "B'
What are keywords?
Keywords are the reserved words which has a meaning and cannot be used a variable name. keywords contain a specific meaning which is been known to the compiler. There are 32 keywords in C.
auto, double, int, float, for, char, void, volatile, static, break, if, else, enum, do, goto, default, continue, const, case, long, short, sizeof, signed, return, register, switch, union, typedef, unsigned, extern.
ADS HERE !!!