Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data types?!?! What's this?!?!?

Status
Not open for further replies.

Lauro

Programmer
Jul 29, 2001
10
BR
Hi all! ! !

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.

Please, help me ! ! !
 
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
1c.bmp


filipski@excite.com
 
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top