C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 4)
4.
How many bytes are occupied by near, far and huge pointers (DOS)?
Answer: Option
Explanation:
near=2, far=4 and huge=4 pointers exist only under DOS. Under windows and Linux every pointers is 4 bytes long.
Discussion:
41 comments Page 1 of 5.
Himanshu jha said:
1 decade ago
What is defination of near, far, huge?
Suresh said:
1 decade ago
I'm not able to understand, please tell me brifely.
Why near occupies 2 bytes?.
Why near occupies 2 bytes?.
Prasadreddy307 said:
1 decade ago
What is defination of near, far, huge?
Sravanthi said:
1 decade ago
What is DOS?
Sundar said:
1 decade ago
DOS - Disk Operating System (16 bit) from Microsoft.
Vasanth said:
1 decade ago
What is defination of near, far, huge
Maahi said:
1 decade ago
How to use these near, far and huge in programming?
Himanshu said:
1 decade ago
http://wiki.answers.com/Q/What_are_near_far_and_huge_pointers_in_C
Bijan said:
1 decade ago
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.
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:
1 decade ago
@bijan
thank u sooo much
thank u sooo much
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers