subject

C Program Only Retrieving a GIS Record Located at a Given File Offset
You will implement the following function in C, and place the implementation in a file named recordRetriever. c:
Returns the GIS record at the given offset.
Pre: gisFile is open on a GIS record file
offset is a valid offset for the given GIS record file
Returns: a valid C-string holding the specified GIS record
char* retrieveRecord(FILE* gisFile, uint32_t offset);
Assumptions you may make in designing your solution:
The GIS record file will correspond exactly to the description given earlier, but it will be a different file than the one shown earlier in this specification.
No line in the GIS record file will be longer than 500 characters, including the line terminator.
The caller will ensure that all the stated preconditions are true.
Use int fseek(FILE* stream, long offset, int whence) and void* calloc(size_t nelem, size_t elsize); to implement this function.
GISData. txt file
FEATURE_ID|FEATURE_NAME|FEATURE_CLA SS|STATE_ALPHA|STATE_NUMERIC|COUNTY _NAME|COUNTY_NUMERIC|PRIMARY_LAT_DM S|PRIM_LONG_DMS|PRIM_LAT_DEC|PRIM_L ONG_DEC|SOURCE_LAT_DMS|SOURCE_LONG_ DMS|SOURCE_LAT_DEC|SOURCE_LONG_DEC| ELEV_IN_M|ELEV_IN_FT|MAP_NAME|DATE_ CREATED|DATE_EDITED
885513|Siegrest Draw|Valley|NM|35|Eddy|015|323815N| 1043256W|32.6376116|-104.5488549|32 3859N|1043732W|32.6498321|-104.6255 227|1095|3592|Parish Ranch|11/13/1980|
885526|AAA Tank|Reservoir|NM|35|Eddy|015|32104 3N|1041456W|32.1786543|-104.2489615 1006|3300|Bond Draw|11/13/1980|06/23/2011
885566|Adobe Draw|Valley|NM|35|Eddy|015|322820N| 1042141W|32.4723375|-104.361345|322 704N|1042129W|32.4511111|-104.35805 56|1007|3304|Carlsbad West|11/13/1980|
885567|Adobe Flat|Flat|NM|35|Eddy|015|322849N|10 42119W|32.4803932|-104.35523391006| 3300|Carlsbad West|11/13/1980|
885607|Alacran Hills|Range|NM|35|Eddy|015|322812N| 1041055W|32.4701183|-104.1818931100 9|3310|Carlsbad East|11/13/1980|
885684|Alkali Lake|Lake|NM|35|Eddy|015|323039N|10 41133W|32.5109371|-104.1924802966|3 169|Angel Draw|11/13/1980|06/23/2011
885697|Allen Well|Well|NM|35|Eddy|015|322309N|10 42120W|32.3859489|-104.35550841038| 3405|Carlsbad West|11/13/1980|
885746|Anderson Young Ranch|Locale|NM|35|Eddy|015|325046N |1044615W|32.8462175|-104.770804212 77|4190|Sixteenmile Draw East|11/13/1980|
885751|Andrews Well|Well|NM|35|Eddy|015|322531N|10 40553W|32.4253974|-104.0980001958|3 143|Indian Flats|11/13/1980|
885753|Angel Draw|Valley|NM|35|Eddy|015|323344N| 1041109W|32.5623397|-104.1857846|32 3423N|1041406W|32.5730556|-104.235| 985|3232|Angel Draw|11/13/1980|

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:30, oofoofoof1
Write a program that reads the file, then displays the average number of steps taken for each month. (the data is from a year that was not a leap year, so february has 28 days.) your program needs to use at least 3 functions not counting main and display the information in a neat well formatted fashion.
Answers: 3
image
Computers and Technology, 22.06.2019 08:00, dramaqueenactr2040
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
image
Computers and Technology, 23.06.2019 13:00, dimondqueen511
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
You know the right answer?
C Program Only Retrieving a GIS Record Located at a Given File Offset
You will implement the...

Questions in other subjects:

Konu
English, 09.02.2021 21:40