Since the structure contain a char pointer while writing the structure to the disk using fwrite() only the value stored in pointer n will get written. so fread() fails to read.
Discuss About this Question.
It is not possible to create an array of pointer to structures.
Discuss About this Question.