Question: I need help with C. Please explain the details. 1. What will be the output of the program? # include typedef struct (int x; char
I need help with C. Please explain the details.


1. What will be the output of the program? # include typedef struct (int x; char v; > rec ti int main) int c FILE *fp; rec_t my; fp-fopen ("test.bin", "wb"); fwrite (&my, sizeof (rec_t), 1, fp) sizeof (my), sizeof (rec_t), sizeof (my.x), sizeof (my.v), my.x, my.v); fclose (fp); printf ("%d; %d; %d; %d; %d; %c ", return 0 2. After executing the program in Question 1, what would be the output of the following program? # include typedef struct fint x; char v; > rec_t: int main) f int c; FILE *fp; rec_tmy;fp-fopen ("test.bin", "rb"); fread (&my, sizeof(rect), 1, fp ); printf("(%d, tc): ", my . x, fseek (fp, 4*sizeof (rec t), SEEK SET) fread (&my, sizeof (rect), 1, fp ); printf("(ed, %c); ", my . x, fseek (fp, -2 sizeof (rec_t), SEEK_CUR) fread (&my, sizeof(rect), 1, fp ); printf ("(%d, 3c); ", my . x, fseek (fp, -16, SEEK_END) fread (&my, 8, 1, fp ); printf(ngd, %c); ", my . x, my . v); rewind (fp); fread (&my, sizeof (rect ), 1, fp ); printf("(%d, 3c); ", my . x, my . v); my . v); my . v); - - - my . v); - fclose (fp) return 0; 3. If the size of an integer is 4bytes, what will be the output of the program? #include int main() f int arr [ ] = {1 sizeof (arr), 0, 11, 12, 13, 14); %din", sizeof (*arr), printf("%d,%d,ed, return 0; * (arr+1), *arr+1)