Blogger Widgets

Wednesday, September 3, 2014

How the size of the data types will be allocated in C

                Hi friends you know the exact reason how the size is allocating  to the data types in C language. Some of the people may have the confusion that " Why the data type Int in C is allocating 4bytes in 64-bit operating systems also rather than 8 bytes?". Here is the reason for that.Hope it will help you. If any mistakes in this post please comment.

Reason:
             Actually we know the allocation is based on the architecture of our operating system(ex:16,32,64-bit). And for an operating system there may be exist different data models(Ex: LP64, ILP64 and LLP64). But only one model is apt to the system hardware and software.64-bit Windows operations system in which LLP64 is the original data model. But for compatibility purposes the 64-bit Windows operations system supports execution of 32-bit programs which work in the mode of ILP32LL data model.

source:

No comments:

Post a Comment