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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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