Well, I'm here again.
I'd like to know the concept of "data type" in computer programming. I know how to use them: int, float, double etc.
However, I don't know its concept.
data type in a computer is nothing. The main thing there is how do you interpret data. Also it has a special meaning in programming languages, because they has some implicit data type. You can create your own dataa types, with struct/typedef struct. But for computer is only bytes. Ion Filipski
Data type:
For computer is just a specific size of memory.
(when you creating double you are allocating 8 bytes, for integer 4, etc.)
For compiler it is also the way how to treat this chunk of memory or what data is in this memory and how this data formed in it.
(for example: for double d[5]; in memory will be allocated
8*5=40 bytes (8 size of double, 5 number of ellements) and compiler also assumed that after each 8 bytes in this 40 bytes menory chunk will be a new ellement)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.