What is "far" and "near" pointers in "c"...?

Answers were Sorted based on User's Feedback



What is "far" and "near" pointers in "c"...?..

Answer / narasimha

"near" and "far" pointers are actually non-standard
qualifiers that you'll find only on x86 systems. They
reflect the odd segmentation architecture of Intel
processors. In short, a near pointer is an offset only,
which refers to an address in a known segment. A far pointer
is a compound value, containing both a segment number and an
offset into that segment.

Segmentation still exists on Intel processors, but it is not
used in any of the mainstream 32-bit operating systems
developed for them, so you'll generally only find the "near"
and "far" keywords in source code developed for Windows 3.x,
MS-DOS, Xenix/80286, etc.

Is This Answer Correct ?    5 Yes 1 No

What is "far" and "near" pointers in "c"...?..

Answer / rag

It is used to access the higher memory addresses.

Is This Answer Correct ?    1 Yes 0 No

What is "far" and "near" pointers in "c"...?..

Answer / peter

I think it's kind of pointer for different computer
architecture such as X86, IBM power server and so on because
various model of memory model is different.

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.

0 Answers   RoboSoft,


WAP to display 1,2,3,4,5........N

2 Answers  


main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above

2 Answers   HCL,


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  






# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }

1 Answers  


why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

1 Answers  


what is variable length argument list?

2 Answers  


main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

3 Answers   HCL,


main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }

1 Answers   DCE,


struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above

2 Answers   HCL,


Categories