Define an appropriate data structure for a sector

Assignment Help Basic Computer Science
Reference no: EM13935792

define an appropriate data structure for a sector, using methods discussed during the lecture. Declare three sectors. Use 31 as
the track number and 1, 2 , 3 as the sector numbers; Access the sectors using a pointer.
- format the sectors, by initialising the various fields of the sectors with appropriate values as shown above, as well as calculating
the error code;

- reading appropriate amounts of data from the text file, writing it into the sector, and calculating and writing the error code;

- dumping the sector contents to the screen in a neat format. This shows that everthing was written properly

The algorithm for calculating the error check is as follows ('old' and 'new' are integers):

old = 0
for (all bytes in the data area) do
new = (old*23 + byte) mod 65536
old = new

The final result is a 16-bit variable whose value is highly dependent upon the sequence of bytes that was used.

Note that you have to put the following lines at the start of the
program:
#include <stdio.h>
#include <string.h>

Your program should make generous use of comments to make sure that everything is explained clearly. Include brief documentation outlining the stucture of the code, and testing results.

Your submission should consist of a single pdf file on Blackboard, in the format detailed at the end of your lecture notes handout.

Reference no: EM13935792

Questions Cloud

Which firm is subject to higher degree of economic exposure : The parent of each firm subsidizes its respective research and development centre on an annual basis. Which firm is subject to a higher degree of economic exposure? Explain.
Create an array object and implement its length property : Create a Date object and implement several of its methods to set and get the date and get the time.
Which members of tbacteria used to prouce most of antibiotic : What is the correct order for the taxons of life from most general to most specific? will be a boy? Which members of tbacteria are used to prouce most of the antibiotics used in medicine today?
What discharge in cfs flows through : The elevation of the surface of the lake is 928.75, and the invert of the orifice is 905.25. When the orifice is opened, what discharge in cfs flows through into the stream below the dam?
Define an appropriate data structure for a sector : define an appropriate data structure for a sector, using methods discussed during the lecture. Declare three sectors. Use 31 asthe track number and 1, 2 , 3 as the sector numbers; Access the sectors using a pointer.
Which firm is subject to a higher degree of translation : Comparing degrees of translation exposure. Based on the information provided, which firm is subject to a higher degree of translation exposure? Explain.
Calculate the required return for a company : Describe how the concept of beta impacts financial decision-making. Calculate the required return for a company Z that has a beta of 1.4 if the market risk premium is 9% and the risk-free rate is 4%
Allocating and managing risks in the oil and gas industry : When it comes to allocating and managing risks in the Oil & Gas Industry, there are several ways in which both the host country and the international oil companies manage this.
Program to tests whether a word or phrase is a palindrome : The choice of page elements (e.g., test boxes, buttons, text areas) and their layout is up to you, but the overall design should be intuitive and user friendly.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How does information technology support supply chains

How does information technology (IT) support supply chains and business processes in the global marketplace?

  How many strings will be read

You should read a list of strings from a data file (using scanf), and find the minimum and maxium values of the string data. The input file format will start with a single integer that indicates how many strings will be read, and then lists those ..

  Detailed security requirements for inclusion in an rfp

Document 20 detailed security requirements for inclusion in an RFP. These requirements should focus specifically on security of the logon process (authentication) of users into a networked application.

  Design a nine-step counter to count

Design a nine-step counter to count in the following sequence using D flip-flops (TTL 74704) on a breadboard

  Computer systems architecture

Windows hides most of its configuration in a binary file called a registry. Special Windows tools must be used to read and modify the registry. What are the advantages and disadvantages of this approach as opposed to using text-based configuration fi..

  Explain the difference between project-based and

prepare a list of it project-based tasks in an organization where you have worked. if you have not worked in any

  Timberline technology manufactures membrane circuits

Timberline Technology manufactures membrane circuits in its Northern California plant

  Passing an "in out" parameter to a procedure

In Ada, when passing an "in out" parameter to a procedure, the system is allowed to use either pass-by-reference or pass-by-value-result as it sees fit. Why?

  Difference between xml and html

Write a 4-5 page paper in which you discuss XML and its standards. Identify the difference between XML and HTML. Provide three examples of how XML is used. Describe XML standards

  What does the top box, middle box and last box contain

There are three boxes in a Unified Mark-Up Language class diagram. What does the top box, middle box, and last box contain?

  Visual logic problem

Visual logic problem.

  Print this listing table only in landscape mode

Print this Listing table ONLY in landscape mode. In Page Setup, print the table to fit to 1 page wide by 2 pages tall. Your printout should contain only the Listing table including the Totals Row.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd