Question: C programming: files, structures Aim: To demonstrate your knowledge in using handling FILES in C Programs Title: C Program to Read & Write data into

C programming: files, structures

C programming: files, structures Aim: To demonstrate your knowledge in using handling

FILES in C Programs Title: C Program to Read & Write data

Aim: To demonstrate your knowledge in using handling FILES in C Programs Title: C Program to Read & Write data into a data file In this lab you will write a program for reading information from a data file and saves a summary report into another data file. The summary report will include the average, the maximum, and the minimum value. A data file named 'speed.txt' contains several speed readings, the first record in the speed data file contains an integer that specifies the number of records that follow. Each of the following lines contains a time and speed reading 0.0 0.1 0.2 0.3 0.4 0.5 132.5 147.2 148.3 157.3 163.2 158.2 169.3 148.2 137.6 135.9 0.6 0.7 0.8 0.9 The output of the problems should be saved into another data file, named 'Output.txt'. With the following data: Number of sensor readings: 10 Average reading: 149.77 Maximum reading: 169.30 Minimum reading: 132.5 12.2 Aim: To demonstrate your knowledge in using nested structures with dynamic memory allocation Title: C Program to Store Information of Students Using Structure This is an extension to the task 10.1 from week 10. Rewrite the implementation of the nested structures based on the following instructions: 1. The program should be capable of storing any number of students 2. Program to allow each student to register for a minimum of one (1) subject and a maximum of four (4) subjects Use the following subject & student structure as a guide for your implementation typedef struct char ID[10]: I/subject ID char name[10]; //subject name COS10008 - Foundations of Technical Programming NE float marks; /subject marks }unit_template; type struct char ID[10]: I/student ID char name[10]; //student name int count; //subject count unit_template "unit; Ilpointer to store the memory address where the student's unit details are stored }student; Sample data: Details for 3 students Student-1 ID-10011 Name - John Count - 3 Unit -7623AB (Address) Student-2 ID-10012 Name - Peter Count-1 Unit - 1432AC Student-3 ID-10013 Name - Helen Count - 2 Unit - 9872AD Diagrammatic representation of the above sample data ID-10011 Name - John Count - 3 Unit - 7623AB ID-10011 Name - John Count - 1 Unit - 1432AC ID-10011 Name - John Count -2 Unit - 9872AD 9872AD ID-S100B ID - 51001 Nam-C Program Marks -98 Marks - 55 7623AB ID-1001 ID-S1008 ID-S1004 Name - Database Marks - 57 Marks - Marks - 76 1432AC ID-S1001 Marks - 88

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!