Question: Programming Requirements For assignment 3, our exerciseData struct used c-strings that were a constant size, as you can see from the version 3 struct to

 Programming Requirements For assignment 3, our exerciseData struct used c-strings that
were a constant size, as you can see from the version 3
struct to the left. But this kind of storage wastes a lot
of memory. In order to hold an exercise that has a long

Programming Requirements For assignment 3, our exerciseData struct used c-strings that were a constant size, as you can see from the version 3 struct to the left. But this kind of storage wastes a lot of memory. In order to hold an exercise that has a long name or note, strSize /I Project 3 Version struct exerciseData needed to be fairly large. Let's use an // Project 4 Version struct exerciseData char name strSize];example "Great Workout", which might be name; char date[strSizel; a note for one of the exercises. This c-stringchr. t char note[strSize]: int time; int calories; int maxHeartRate; only has 13 characters. Suppose you set up strSize to be 128. Then 115 bytes are wasted, because we set them aside but didn't use them. So, for assignment 4, we will be replacing the c-strings with char charnote; int time; int calories; int maxHeartRate; li pointers, as you can see in the project 4 version on the right. This will allow us to set aside just the right amount of space for each c-string item

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!