Preview

Program for Contiguous Allocation

Good Essays
Open Document
Open Document
317 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Program for Contiguous Allocation
/Contiguous file allocation/
#include<stdio.h>
Int main()
{
char a[10][10]; int I,flb[10],sb[10]; for(i=1;i<=5;i++) { printf(“\nEnter the file name:”); scanf(“%s”,&a); printf(“\nEnter the starting block:”); scanf(“%d”,&sb[i]); printf(“\nEnter the file length in blocks:”); scanf(“%d”,&flb[i]); } printf(“\n\nList of files\tstarting block\tfile length”); for(i=0;i<5;i++) { printf(“\n%s\t%d\t%d”,a[i],sb[i],flb[i]); } return 1;
}

/indexed allocation/
#include<stdio.h>
int main()
{
char a[10]; int i,1.b,a.b[10]; srintf(“\nEnter the file name:”);
Scanf(“%d”,&a);
printf(“\n\nIndexed block:”); scanf(“%”,&ib); for(i=1;i<5;i++){ printf(“\nEnter the child of index block%d:”,i); scanf(“%d”,&c I b[i]);
}
printf(“\n\n\nThe list of files\t index block”); printf(“\n\n%s\t%d”,a,ib); printf(“\n\nThe above file utilization index block of child following!\n\n\t”); for(i=1;i<=5;i++){ printf(“%d\t”,c I b[i]);
}
return 1;
}

/linked allocation/
#include<stdio.h>
Int main()
{
char a[10]; int I,fb1[10],sb,eb; printf(“\nEnter the file name”); scanf(“%d”,&a); printf(“\nEnter the ending block”); scanf(“%d”,&ob); for(i=0;i<5;i++){ printf(“Enter the free block %d”,i+1); scanf(“%d”,&f b[i]);} printf(“\n\nFile name\t starting block \t ending block”); printf(“\n\n%s\t%s\t%d\t%d”,a,&b,eb); printf(\n\n%s file utilization of linked type of following block\n”,a); printf(“\n\n\n%d->”,&b); for(i=0;i<5;i++){ printf(“%d->”,fb1[i]);} printf(“%d”,eb);
return

You May Also Find These Documents Helpful

  • Satisfactory Essays

    cout << num1 << " * " << num2 << " = " << num1*num2;…

    • 426 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Hi Kristin, the context diagram that you have posted truly represents most of the high level external entities needed for the Scale2 project. This particular context diagram presents sensors and alarms as well as the building alarm as two separate entities or terminators. I wonder if they are redundancies that could be combined into one in order to enhance your work. The other wonder is on the health monitoring device in relationship to the information medical records database and the mobile devices and/or tables; can I consider them been an aggregate of the health monitoring device and/or you do not believe they are high level enough for the context diagram? In my context diagram I represent database health records and mobile devices as two…

    • 147 Words
    • 1 Page
    Satisfactory Essays
  • Better Essays

    #include #include float avg_wt,avg_tt; int i = 0,ttl_wt=0,ttl_tt=0,qt; struct process { int prn; char type; int bt; int wt; int tt; struct process *nxt; }*stfor,*stbck,*np,*endfor,*endbck,*temp; void ins_node(struct process *np) { if(np->type == 'f') { if(stfor == NULL) stfor = endfor = np; else { endfor->nxt = np;…

    • 401 Words
    • 2 Pages
    Better Essays
  • Powerful Essays

    Steve is responsible for doing research for the strategic plan, fulfils his tasks within the strategic plan, makes sure he writes his documents in proper English and uploads it on Facebook. Specialists are a fountain of knowledge and will enjoy imparting this knowledge to others.…

    • 3994 Words
    • 16 Pages
    Powerful Essays
  • Good Essays

    Epic is privately held health care software company. In 1979, it was established by Judith Faulkner. The organization central command was in Madison, Wisconsin, yet in 2005 the organization moved to Vernon, Wisconsin. The product 's business is health awareness associations, and it is a fascinating suite of human services programming fixated on a MUMPS database. (Massachusetts General Hospital Utility Multiple Programming System). It is a programming dialect that was made in the 1960 and afterward utilized for the health awareness associations.…

    • 799 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Individual Assignment

    • 481 Words
    • 2 Pages

    5. Compute Benetton’s margin of safety using data from 2003 and 2004 . Why do your answer for the two years differ from one another?…

    • 481 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    individual assignment

    • 3335 Words
    • 14 Pages

    cooling device for this experiment with efficiency of 0.86 %. Qulatitive analysis was done with consideration of…

    • 3335 Words
    • 14 Pages
    Better Essays
  • Good Essays

    The Apportionment Problem

    • 924 Words
    • 4 Pages

    For this assignment, I needed to find out how many representatives are going to be assigned to each of the 10 states in the newly democratic nations. The first step was to add all of the state’s populations together. The total population is 532,188. The next step was to divide each individual states population by the total population to see how many seats that each state should receive for representation. After I have a percentage, I give a representative for each whole number. Once I add up the whole numbers, I have 95 out of my 100 seats spoken for. The remaining seats need to be assigned out by the highest fractional value of each state. The chart below shows these steps and the totals of each representative per state. (I am questioning if this is right. I would assume that each state should have a representative but state 5 did not get one, even with the extra states and the fractional numbers.)…

    • 924 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    KBR, Inc. is one of the world's premiere engineering, procurement and construction companies with a presence in five continents, offering services through ten business units. They provide defense services for the United States and other international government agencies, along with, being known as the leader of the oil and gas industry. This company has completed ground-breaking projects like producing the world's largest Floating Production Storage and Offloading vessels. KBR performs numerous projects at any given time, and usually contributes to multiple elements of each project. An issue that arises with accounting for multiple deliverable contracts is deciding when and how to recognize revenue. A company must first determine if they should recognize revenue for the contract as a whole unit or as separate units of accounting. Next, the measurement of revenue recognition must be calculated. The final step is to determine when the revenue will be recognized. Typically, this is based on the type of project or contract at hand.…

    • 1277 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    programiing

    • 923 Words
    • 4 Pages

    6: Write a program that reads a single word into a character array and then prints the word backward. Hint: Use strlen() (Chapter 4) to compute the index of the last character in the array.…

    • 923 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    individual assignment

    • 923 Words
    • 3 Pages

    Transfer training is refers to the effect that knowledge or abilities acquired in one area have on problem solving or knowledge acquisition in other areas. Transfer of training should be considered as an essential requirement for the effectiveness of training programs and for the advancement of real workplace. In this report, we are going to do a summary and evaluation on characteristic, working environment and supervisory and peer support influence to the transfer of training.…

    • 923 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Clear evidence of emotional work, the employees were all smiling, cheerful, and very welcoming. I observed an employee acknowledging concerns of his customer, and trying his best to change their mood into a positive one.…

    • 1086 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Linux Commands

    • 5778 Words
    • 24 Pages

    All components of the path will be actual folder names - none will be symbolic links.…

    • 5778 Words
    • 24 Pages
    Good Essays
  • Powerful Essays

    Sampling Assignment

    • 1332 Words
    • 6 Pages

    This Report introduces, identifies, compares and comments on the advantages and disadvantages of Absorption and Marginal costing methods, highlighting the key differences between them with a background explanation in relation to, types and classification of costs, allocation and apportionment and to identify its place within management accounting. In Management accounting, the process of measuring and recording all costs within a business is needed in order for there to be an effective accounting system, this process is known as Cost accounting. There are many advantages to managers which cost accounting techniques provide, being in cost information, where by mangers are more able to make sensible decisions towards their business objectives. For instance if a business is trying to decide whether or not to continue the production a product out of 6 items, there will be little if any information, as to the amount each item contributes to the profitability of the business, without Cost accounting.…

    • 1332 Words
    • 6 Pages
    Powerful Essays
  • Powerful Essays

    In the Obafemi Awolowo University academic environment, the number of lecture rooms compared to the number of courses offered, the capacity of each lecture room compared to the number of students shows a large difference. This difference has resulted to incompletion of course syllabus since venues are not always available to take courses at the due time. This problem and some more introduced in the problem statement has triggered the need for the introduction of information technology in the area of Lecture Room Allocation System.…

    • 1374 Words
    • 6 Pages
    Powerful Essays

Related Topics