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.
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.
|