My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
//program relocation//
Posted Date:
Total Responses: 0
Posted By: R V Vinod Babu Member Level: Silver Points/Cash: 3
|
//program relocation// #include #include #include #include struct a { char b[10][10]; }; struct a source[10]; struct a re[10]; void main () { FILE *f1,*f2,*f3; int i,j,k,n,s,table,reloc; clrscr(); f1=fopen("reinput.txt","r"); f2=fopen("reloc.txt","r"); f3=fopen("reoutput","w"); k=0; printf("\t/****SOURCE FILE****/\n"); while(!feof(f1)) { for(i=0;i<5;i++) { fscanf(f1,"%s",&source[k].b[i]); printf("%s\t",source[k].b[i]); } printf("\n"); k++; } s=k; printf("number of lines %d\n",s); printf("\t/****RELOCATION TABLE****/\n"); k=0; while(!feof(f2)) { for(i=0;i<1;i++) { fscanf(f2,"%s",&re[k].b[i]); printf("%s\t",re[k].b[i]); } printf("\n"); k++; } table=k; printf("number of entry %d\n",table); printf("enter the relocation address:"); scanf("%d",&reloc); printf("\nthe relocated program\n"); for(i=0;i{ n=0; printf("%d\t%s\t%s\t%s\t",reloc+i,source[i].b[1],source[i].b[2],source[i].b[3]); for(j=0;j
|
Advertise Here
|
Contact Us Advertise Editors Privacy Policy Terms Of Use
ISC Technologies. 2006 - 2009 All Rights Reserved.
|