Question: I want someone to convert this c++ code to java Code : #include int main() { int m,p,s,p1; int m1[4],i,f,fra1,fra2,s1,pos,f1,s2; int f1=0,f2=0; printf(enter the size

I want someone to convert this c++ code to java Code :

#include int main() { int m,p,s,p1; int m1[4],i,f,fra1,fra2,s1,pos,f1,s2; int f1=0,f2=0; printf("enter the size of memory:"); scanf("%d",&m); printf("enter the number of partitions:"); scanf("%d",&p); s=m/p; printf("each patrn size is %d",s); printf(" enter the number of process:"); scanf("%d",&p1); pos=m; for(i=0;is) { s1=s1-s; pos=pos-s; } pos=pos-s; fra2=s-s1; f2=f2+fra2; printf(" External Fragmentation for this process is %d",fra2); } } } printf(" process\tallocated memory"); for(i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!