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 |
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
What is your nationality?
what is brs test reply me email me kashifabbas514@gmail.com
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
abcdedcba abc cba ab ba a a
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange