Question: bool read ( Assessment& assess, FILE * fptr ) ; First, it will try to read a double value for the mark and a string
bool readAssessment& assess, FILE fptr;
First, it will try to read a double value for the mark and a string for the title into a temporary local double variable and a character lone cString for null
If the read is successful, it will then allocate a dynamic double and a dynamic cString to the exact size of the read cstring from the file into the fields of the assess structure assessmmark and assess.mtitle and copies the values into them.
In this case, the function will return true, otherwise, it will return false with no memory allocation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
