What are segment and offset addresses?
Answers were Sorted based on User's Feedback
Answer / sanjay bhosale
Segments are nothing but sections for e.g code segment(also called text region),data segment, stack segment and heap segment.
They represent different parts of the process or different aspects of the process.
Offsets represents address where next read of write should begin.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / mayank
When paging technique is performed ,The page will breaks in
to the segments and its sequence is said to be segments and
is width or can be said as length is called is offset.
In sort...
segment is physical address..
and offset is logical address..
| Is This Answer Correct ? | 14 Yes | 11 No |
plz send me all data structure related programs
how to swap 3 nos without using temporary variable
How do you write a program which produces its own source code as its output?
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
main() { char not; not=!2; printf("%d",not); }
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }