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 c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).
0 Answers CDAC, College School Exams Tests,
Program to find the largest sum of contiguous integers in the array. O(n)
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
What is data _null_? ,Explain with code when u need to use it in data step programming ?
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
Give a oneline C expression to test whether a number is a power of 2?
25 Answers EA Electronic Arts, Google, Motorola,
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
main() { printf("%x",-1<<4); }
How to count a sum, when the numbers are read from stdin and stored into a structure?