Student age has been represented by a whole number which is 13. Student section has been represented by a single character which is 'J'. Student class "6th" has been represented by a mix of whole number and a string of two characters. Student name "Zara Ali" is a sequence of characters which is also called a string. The first example dealt with whole numbers, the second example added two decimal numbers, whereas the third example is dealing with a mix of different data. Now, let's put one student record as per the given requirement − Here we would like to record the following information − Now let's take another example where we want to record student information in a notebook. Let's take another problem where we want to add two decimal numbers 10.50 & 20.50, which will be written as follows − Let’s keep Computer Programming aside for a while and take an easy example of adding two whole numbers 10 & 20, which can be done simply as follows − It can be numeric, alphanumeric, decimal, etc. As its name indicates, a data type represents a type of the data which you can process using your computer program. Let's discuss about a very simple but very important concept available in almost all the programming languages which is called data types.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |