If the following structure is written to a file using fwrite(), can fread() read it back successfully?
struct emp
{
char *n;
int age;
};
struct emp e = { "Sujay",15};
FILE *fp;
fwrite (&e, sizeof (e), 1, fp);5
988 5b5cc7dde4d2b419777515d5
Q: If the following structure is written to a file using fwrite(), can fread() read it back successfully? struct emp { char *n; int age; }; struct emp e = { "Sujay",15}; FILE *fp; fwrite (&e, sizeof (e), 1, fp);
- Show Answer
- Workspace
- Discuss