Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing

# C Programming - Pointers - Discussion

@ : Home > C Programming > Pointers > General Questions - Discussion

"Nothing is impossible to a willing heart."
- (Proverb)
4.

How many bytes are occupied by near, far and huge pointers (DOS)?

 [A]. near=2 far=4 huge=4 [B]. near=4 far=8 huge=8 [C]. near=2 far=4 huge=8 [D]. near=4 far=4 huge=8

Explanation:

near=2, far=4 and huge=4 pointers exist only under DOS. Under windows and Linux every pointers is 4 bytes long.

 Himanshu Jha said: (Mon, Oct 11, 2010 05:01:48 AM) What is defination of near, far, huge?

 Suresh said: (Fri, Nov 5, 2010 04:04:02 AM) I'm not able to understand, please tell me brifely. Why near occupies 2 bytes?.

 Prasadreddy307 said: (Wed, Nov 24, 2010 08:08:14 PM) What is defination of near, far, huge?

 Sravanthi said: (Mon, Nov 29, 2010 11:39:43 PM) What is DOS?

 Sundar said: (Mon, Nov 29, 2010 11:45:20 PM) DOS - Disk Operating System (16 bit) from Microsoft.

 Vasanth said: (Mon, Jan 3, 2011 01:32:07 AM) What is defination of near, far, huge

 Maahi said: (Sun, Jan 9, 2011 11:18:33 AM) How to use these near, far and huge in programming?

 Himanshu said: (Thu, Jan 27, 2011 11:54:30 AM) http://wiki.answers.com/Q/What_are_near_far_and_huge_pointers_in_C

 Bijan said: (Mon, Apr 18, 2011 06:20:09 AM) A far pointer is a pointer which includes segment number. In a segmented architecture computer, far pointers are used to address the entire 1mb memory which is available under Dos. Most programmers today (as of 2009) never use far pointers. Instead, most programmers always use 32 bit "flat pointers". example: int main() { int a; a=10; printf("%d",&a); return 0; } A near pointer is a 16 bit pointer to an object contained in the current segment, be it code segment, data segment, stack segment, or extra segment. The huge pointer is a monolithic pointer to some item with a large chunk of memory, and there are no segment:offset boundaries.

 Rajesh said: (Fri, Jul 1, 2011 02:11:14 PM) @bijan thank u sooo much

 Santosh said: (Fri, Jul 8, 2011 03:18:46 AM) How to use these near, far and huge in programming ?

 Nupur said: (Mon, Aug 8, 2011 07:29:06 PM) Thankyou for such a nice explanation

 Thilak said: (Sat, Sep 17, 2011 01:49:48 PM) Thanks for nice explanation.

 Dhilan said: (Thu, Sep 22, 2011 02:50:24 PM) Thank you for this explanation.

 Priyanka said: (Sun, Nov 6, 2011 10:17:31 AM) Thank you dear for explanation.

 Haresh said: (Mon, Apr 29, 2013 06:43:01 PM) DOS is Hardware or Software? please answer me.