What is "far" and "near" pointers in "c"...?
Answers were Sorted based on User's Feedback
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 |
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 |
Write a procedure to implement highlight as a blinking operation
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
5 Answers IITR, Microsoft, Nike,
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Cluster head selection in Wireless Sensor Network using C programming language.
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
main() { int c=- -2; printf("c=%d",c); }
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
main() { extern int i; i=20; printf("%d",sizeof(i)); }