A near pointer is nothing but the pointers which we commonly use. A far pointer has a selector (base address) and offset (index) kind of thing, where selector is fixed. A huge pointer has a selector and offset are used, but, the selector is modifiable.
For further references visit: http://stackoverflow.com/questions/8727122/explain-the-difference-between-near-far-and-huge-pointers-in-c http://wiki.answers.com/Q/What_are_near_far_and_huge_pointers_in_C
near pointers - 2 bytes far pointers - 4 bytes huge pointers - 4 bytes
For more details on near, huge and far pointers, visit: http://wiki.answers.com/Q/What_is_the_difference_between_far_pointer_and_huge_pointer_in_C_programming_language
First of all, these pointers (near, huge and far) are specific only to Turbo C/C++ and they are not available for gcc/g++. near pointers are the normal pointers which we use simply as "pointers". The other two pointers are used to access the memory locations, which are not accessible by near pointers. Most common application of these pointers are in system programming (for example, to access ports for writing driver programs).
what is huge far and near pointer
ReplyDeleteA near pointer is nothing but the pointers which we commonly use.
DeleteA far pointer has a selector (base address) and offset (index) kind of thing, where selector is fixed.
A huge pointer has a selector and offset are used, but, the selector is modifiable.
For further references visit:
http://stackoverflow.com/questions/8727122/explain-the-difference-between-near-far-and-huge-pointers-in-c
http://wiki.answers.com/Q/What_are_near_far_and_huge_pointers_in_C
can u explain me how many bytes are allocated for these pointers and where these pointers are used in programming
ReplyDeletenear pointers - 2 bytes
Deletefar pointers - 4 bytes
huge pointers - 4 bytes
For more details on near, huge and far pointers, visit:
http://wiki.answers.com/Q/What_is_the_difference_between_far_pointer_and_huge_pointer_in_C_programming_language
can u explain where there pointers are used in program
ReplyDeleteFirst of all, these pointers (near, huge and far) are specific only to Turbo C/C++ and they are not available for gcc/g++.
Deletenear pointers are the normal pointers which we use simply as "pointers". The other two pointers are used to access the memory locations, which are not accessible by near pointers. Most common application of these pointers are in system programming (for example, to access ports for writing driver programs).