New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



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.

website counter



//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;jif(strcmp(source[i].b[4],re[j].b[0])==0)
{
n=1;
printf("%d",reloc+(atoi(source[i].b[4])-atoi(source[0].b[0])));
fprintf(f3,"%d",reloc+(atoi(source[i].b[4])-atoi(source[0].b[0])));
}
if(n!=1)
{
printf("%s",source[i].b[4]);
fprintf(f3,"%s",source[i].b[4]);
}
printf("\n");
fprintf(f3,"\n");
}
fclose(f1);
fclose(f2);
fclose(f3);
getch();
}





Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: //CREATION OF SINGLE PASS ASSEMBLER//
Previous Project: Graphics and toolkit using c

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.