Breaking News

The other Basic Concept of C++


In the previous post we learnt some concept of making variable, and from there we got something called data value as definition said "Is a name, character, word or combination of characters that can be used to store data (value) in a Computer memory." So what are those data that will be stored in the Computer Memory?

  • Value: Anything that will be stored in a computer memory through that variable will be termed as value. It can be a number, string, character etc.
From the definition above, we get to know that there are different types of data (value) that can be stored in Computer Memory, so we have to know those types of data through this term Data Types.

Data Type: Simply are the type of data. There are many types of data, among them which are mostly used are as follows.
  • Integer: These are the positive and negative whole numbers. Example: 5, -6, 100, etc. This is the one among the data that can be stored in a Computer Memory.
  • Characters: These are letters (single letter) from A - Z or any symbol. Example: A, a, &, y, P, etc. Also this is the kind of data that can be stored in a Computer Memory.
  • String: These are the combination of characters. Example: Hello, here we have five characters that combined together to form a string Hello.
  • Float or Double: These are the numbers that have the decimal places. They are like the same though many people confuse between double and integer and the difference is Float has few decimal places than double. Example: 4.6, 120.7, 3.1387, etc. This also is the kind of data that can be stored in a Computer Memory.
  • Bool: This is the data type that takes the value of either true or false or sometimes can be represented as a number, if zero 0 means false and any number which is not equal to zero is true. Example: Value false can be written as 0, false. And true value can be written as 1, true, 10, -76 etc. The uses of this value you'll see in coming posts, just stay with me up to the end of this tutorials.
I hope you have got something to keep in mind about these concepts and as the days goes on you'll become an expert in this.

We are done...!!
Please comment and share with your friends. Don't miss the following post where we will continue to learn the other basic concepts of C++ and that will also be a good foundation in your journey.

Thank you for reading, be blessed....!!!

No comments