C++

6 comments:

  1. what is huge far and near pointer

    ReplyDelete
    Replies
    1. 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

      Delete
  2. can u explain me how many bytes are allocated for these pointers and where these pointers are used in programming

    ReplyDelete
    Replies
    1. 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

      Delete
  3. can u explain where there pointers are used in program

    ReplyDelete
    Replies
    1. 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).

      Delete