What is a variable in C language
Variable is a box which stores the values
Always use meaningful names for variables to reduce confusion in the code with names
Remember: to fully define a variable, one need to mention not only its data type but also its storage class
Declaring variables
A variable has to be declared first to use
Initializing variables
Numeric variables
The numeric variables which we can use in C are first of all, Integer values. second, Floating point values. third, In C, we can use four modifiers

With numeric variables, we can use the four modifiers
Character variables
constant is variable and its values does not change. next, constant variables used for fixed values ( pi=3.14;)
Always make meaningful variable names
suppose if you are making a banking system it is advisable to create meaningful names to avoid confusion and complexity
Rules for variables name creation
- a variable name should be any combination of 1 to 31 alphabets, underscores
- the first character of a variable should be an alphabet or an underscore(_)
- there should not be any blank space or commas in the variable name
- there should not be any special symbol except underscore
What are literals and identifiers in a programming language?
In programming language constants are called literals and variables are called identifiers
consider a constant variable is box whose values are fixed. and a variable is a box whose values can be changed.
related posts
Leave a Reply