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() { extern int i; i=20; printf("%d",i); }
All the combinations of prime numbers whose sum gives 32
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.
2 Answers Mentor Graphics, Microsoft,
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }