Variables

So hola guys....What's up? Hope you all are doing well!
So i know you came here to learn programming and most of you can be here to utilize your time in programming during this pandemic! And if You are not from IT sector then you can go through this blog to learn some basics of computer.

You can also find the pdf of computer basics here


So..let's start!


Variables is not a big word I guess. Let's take an illustration to understand this.
Consider that you have books, a lot, where would you store it?
books images
You will say that you will store it in some container type thing,right? books container Well, in the same manner variables can be defined.
Variables are the type of storage container where you can store different types of data. Data Types Now, again a data can be of different types. It can be mainly a number and a string.

Following are the examples of some very common data types used in C:
  • char: The most basic data type in C. It stores a single character and requires a single byte of memory in almost all compilers.
    Example: Any alphabet whether uppercase or lowercase
  • int: As the name suggests, an int variable is used to store an integer. Example:any integer value from -infinity to +infinity,-388,+5893,etc.
  • float: It is used to store decimal numbers (numbers with floating point value) with single precision. Example:Any floating point number,like 3.5,7.43,949.4997 etc.
  • double: It is used to store decimal numbers (numbers with floating point value) with double precision.
    Example:46.583987598,
    9589.3885895899,etc