In this tutorial you will learn about variables, constants and keywords in C.
When we want to store any information(data) on our computer/laptop, we store it in the computer's memory space. Instead of remembering the complex address of that memory space where we have stored our data, our operating system provides us with an option to create folders, name them, so that it becomes easier for us to find it and access it.
Similarly, in C language, when we want to use some data value in our program, we can store it in a memory space and name the memory space so that it becomes easier to access it.
The naming of an address is known as variable. Variable is the name of memory location. Unlike constant, variables are changeable, we can change value of a variable during execution of a program. A programmer can choose a meaningful variable name. Example : average, height, age, total etc.
A variable in C language must be given a type, which defines what type of data the variable will hold.
It can be:
char: Can hold/store a character in it.
int: Used to hold an integer.
float: Used to hold a float value.
double: Used to hold a double value.