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 |
write a program to Insert in a sorted list
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
Finding a number which was log of base 2
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
Write a program to print a square of size 5 by using the character S.
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
4. Main() { Int i=3,j=2,c=0,m; m=i&&j||c&I; printf(“%d%d%d%d”,I,j,c,m); }
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
C statement to copy a string without using loop and library function..
How to access command-line arguments?