Question 1: You are required to design a structure that can store the book information. The attributes of a book include the title, author, and price, and follow the instructions below to complete related operations on a variety of books. /* Struct books {char title [100]; char author [20]; double price;} doyle = {"My life as a budgie", "Mack Tom", 14.6 }; int main (void) {struct books dicken = {"Thinking in C ++", "Stephen Prata", 78}; struct books panshin = {. title = "C ++ Primer ",. author = "Stanley Lippman ",. price = 92.5}; printf ("The title is: % s \ nThe author is: % s \ nThe price is: % lf \ n", doyle. title, doyle. author, doyle. pri Ce); printf ("\ n"); printf ("The title is: % s \ nThe author is: % s \ nThe price is: % lf \ n", dicken. title, dicken. author, dicken. price); printf ("\ n"); printf ("The title is: % s \ nThe author is: % s \ nThe price is: % lf \ n", panshin. title, panshin. author, panshin. price); printf ("\ n"); printf ("" Thinking in C ++ "); printf ("\ n"); printf ("The title is: % s \ nThe author is: % s \ nThe price is: % lf \ n", dicke N. title, dicken. author, dicken. price = 85); return EXIT_SUCCESS;} */Question 2: add three functions for the above book-related program:/* (1) compile the show () function for displaying book information (). The parameter is a pointer to the structure. The structure of The displayed book information is as follows: The title is: My life as a budgieThe author is: Mack TomThe price is: 14.6 # include <stdio. h> # include <stdlib. h> struct Library {const char title [20]; const char author [10]; double price;} panshin; void show (struct Library * doy) {printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", doy-> title, doy-> author, doy-> price);} int main (void) {struct Library doyle = {" My life A budgie "," Mack Tom ", 14.6}; show (& doyle); return EXIT_SUCCESS;} * // * (2) write the initialization structure variable function init (), the parameter is a pointer to the structure. The function initializes the members in the structure variable. # Include <stdio. h> # include <stdlib. h> struct Library {const char title [20]; const char author [10]; double price;} panshin; void init (struct Library * doyle, struct Library * dicken, struct Library * panshin) {doyle-> title; dicken-> author; panshin-> price;} int main (void) {struct Library doyle = {"My life as a budgie", "Mack Tom", 14.6}; struct Library dicken = {"Thinking in C ++", "Stephen Prata ", 78}; struct Library panshin = {"C ++ Prinner", "Stanley Lippman", 92.5}; init (& doyle, & dicken, & panshin ); printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", doyle-> title, doyle-> author, doyle-> price); printf (" The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", dicken-> title, dicken-> author, dicken-> price); printf (" The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", panshin-> title, panshin-> author, panshin-> price); return EXIT_SUCCESS;} * // * (3) write the function input () that receives the book information from the keyboard. The parameter is a pointer to the structure. The function is to receive the relevant book information from the keyboard and save the information to the library structure variable executed by the pointer. # Include <stdio. h> # include <stdlib. h> struct Library {const char title [20]; const char author [10]; double price ;}; void input (struct Library * doyle, struct Library dicken ,) {scanf ("% s % lf", doyle-> title, doyle-> author, & doyle-> price); scanf ("% s % lf ", dicken-> title, dicken-> author, & dicken-> price); scanf ("% s % lf", panshin-> title, panshin-> author, & amp; panshin-> price);} int main (void) {struct Library doy Le; struct Library dicken; struct Library panshin; input (& doyle, & dicken, & panshin); printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", doyle-> title, doyle-> author, doyle-> price); printf (" The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", dicken-> title, dicken-> author, dicken-> price); printf (" The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", panshin-> tit Le, panshin-> author, panshin-> price); return EXIT_SUCCESS;} * // * (4) The main program completes the function implementation following the process below:) define three book objects: doyle, dicken, and panshin. B) initialize the structure object. C) Receive the book information on the keyboard and save it to three book objects. D) output the information of the three books. # Include <stdio. h> # include <stdlib. h> struct Library {const char title [20]; const char author [10]; double price;} doyle, dicken, panshin; int main (void) {struct Library doyle; struct Library dicken; struct Library panshin; scanf ("% s % lf", & doyle. title, & doyle. author, & doyle. price); scanf ("% s % lf", & dicken. title, & dicken. author, & dicken. price); scanf ("% s % lf", & panshin. title, & panshin. author, & pans Hin. price); printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", doyle. title, doyle. author, doyle. price); printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", dicken. title, dicken. author, dicken. price); printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", panshin. title, panshin. author, panshin. price); return EXIT_SUCCESS;} */Question 3: Create a library (Structure array), which contains the above three books. Create a structure array library and use the previously designed function init () to initialize each book. Use the input () function designed above to receive information about books from the keyboard. Use the show function above to display the input book information. # Include <stdio. h> # include <stdlib. h> struct Library {const char title [20]; const char author [10]; double price;} book [3]; void input (struct Library * (book + 1 ), struct Library * (book + 2), struct Library * (book + 3) {scanf ("% s % lf", (book + 1)-> title, (book + 1)-> author, & (book + 1)-> price); scanf ("% s % lf", (book + 2)-> title, (book + 2)-> author, & (book + 2)-> price); scanf ("% s % lf", (book + 3)-> title, (book + 3)-> author, & (Book + 3)-> price);} void init () {struct Library book [3];} void show (struct Library * (book + 1 ), struct Library * (book + 2), struct Library * (book + 3) {printf ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", (book + 1)-> title, (book + 1)-> author, (book + 1)-> price); printf (" The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", (book + 2)-> title, (book + 2)-> author, (book + 2)-> price); print F ("The title is: % s \ n The author is: % s \ n The price is: %. 1lf ", (book + 3)-> title, (book + 3)-> author, (book + 3)-> price);} int main () {input (& (book + 1), & (book + 2), & (book + 3); init (); show (& (book + 1 ), & (book + 2), & (book + 3); return EXIT_SUCCESS;} Question 4: design a structure that represents vehicle information. Int main () {struct car {char name [20]; char sex [5]; char buyDate [20];} owner = {"Jone", "M ", "2008-01-01"}; struct company {char name [20]; char tel [10];} leaseCompany = {"hualong", "010-88064420 "}; union data {struct car owner; struct company leaseCompany ;}; struct carData {char make [20]; int status; union data {struct car owner; struct company leaseCompany ;} ownerInfo;}; struct carData flits = {. Status = 0 ,. make = "volvo ",. ownerInfo. ownerCar. sex = 'M ',. ownerInfo. ownerCar. buyDate = '2017-11-21 ',. ownerInfo. ownerCar. name = 'rebort cart'}; return 0;} Question 5: Wiliam Wingate is engaged in the PISA Analysis Service. For each pizza, he needs to record the following information: 1. Name of the pizza company. It can contain multiple words. 2. The diameter of the pizza. 3. The weight of the pizza. Design a structure that can store this information and write a program that uses this structure variable. The program will request the user to enter the above information and then display the information. /* Int main () {struct pisa {char name [20]; int zhijing; int zhongliang;} a = {"Wiliam Wingate", 6, 2 }; printf ("Name of the pizza company: % s \ n diameter of the pizza: % d \ n weight of the pizza: % d \ n",. name,. zhijing,. zhongliang); return 0;} */Question 6: design a structure that can store student information. Student information includes: Name, Grade, and score. Follow the instructions below to complete student information operations. /* Struct stu {char Name [100]; char Grade [20]; int score;} stu1 = {"Jiang Nan", "", 78}; int main (void) {struct stu stu2 = {"He Bei", "", 85}; struct stu stu3 = {. name = "Dong Lu ",. grade = "Second Grade ",. score = 99}; printf ("The Name is: % s \ nThe Grade is: % s \ nThe Score is: % d \ n", stu1.Name, stu1.Grade, stu1.score ); printf ("\ n"); printf ("The Name is: % s \ nThe Grade is: % s \ nThe Score is: % d \ n", stu2.Name, stu2. Grade, stu2.score); printf ("\ n"); printf ("The Name is: % s \ nThe Grade is: % s \ nThe Score is: % d \ n ", stu3.Name, stu3.Grade, stu3.score); printf ("\ n"); return EXIT_SUCCESS;} */Question 7: add three functions for the above program about student information: 1. compile the showInfo () function that displays student information. The parameter is a pointer to the structure. The structure of The displayed student information is as follows: The Name is: DongluThe Grade is: TwoThe Score is: 99 # include <stdio. h> # include <stdlib. h> struct Student {char Name [20]; int Grade [4]; int score ;}; void showInfo (struct Student * stu3) {printf ("The Name is: % s \ n The Grade is: % d \ n The Score is: % d ", stu3-> Name, stu3-> Grade, stu3-> score );} int main () {struct Student stu3 = {'dong', 'two', 99}; showInfo (& stu3); return EXIT_SUCCESS ;}**//* * 2. Compile the init () function for initializing the structure variable. The parameter is the structure pointer. The function initializes the members in the structure variable. # Include <stdio. h> # include <stdlib. h> struct Student {char Name [20]; int Grade [4]; int score ;}; void init (struct Student * stu1, struct Student * stu2, struct Student * stu3) {stu1-> Name; stu1-> Grade; stu1-> score; stu2-> Name; stu2-> Grade; stu2-> score; stu3-> Name; stu3-> Grade; stu3-> score;} * // * 3. write the function input () that receives student information from the keyboard. The parameter is also a pointer to the structure. The function receives student information from the keyboard and saves the information to the Structure Variable pointed to by the pointer. # Include <stdio. h> # include <stdlib. h> struct Student {char Name [20]; int Grade [4]; int score ;}; void input (struct Student * stu1, struct Student * stu2, struct Student * stu3) {scanf ("% s % d", & stu1-> Name, & stu1-> Grade, & stu1-> score ); scanf ("% s % d", & stu2-> Name, & stu2-> Grade, & stu2-> score ); scanf ("% s % d", & stu3-> Name, & stu3-> Grade, & stu3-> score);} * // * 4. the main function is implemented according to the following process: a) define three student objects stu1, stu2, stu3. B) to initialize the structure object. c) slave key The received student information is stored in three student objects. D) output the information of the three student objects. # Include <stdio. h> # include <stdlib. h> struct Student {char Name [20]; int Grade [4]; int score ;}; void input (struct Student * stu1, struct Student * stu2, struct Student * stu3) {scanf ("% s % d", & stu1-> Name, & stu1-> Grade, & stu1-> score ); scanf ("% s % d", & stu2-> Name, & stu2-> Grade, & stu2-> score ); scanf ("% s % d", & stu3-> Name, & stu3-> Grade, & stu3-> score) ;} int main () {struct Student stu1; struct Student stu2; struct Stu Dent stu3; input (& stu1, & stu2, & stu3); printf ("The Name is: % s \ n The Grade is: % d \ n The Score is: % d ", stu1-> Name, stu1-> Grade, stu1-> score); printf (" The Name is: % s \ n The Grade is: % d \ n The Score is: % d ", stu2-> Name, stu2-> Grade, stu2-> score); printf (" The Name is: % s \ n The Grade is: % d \ n The Score is: % d ", stu3-> Name, stu3-> Grade, stu3-> score );} */Question 8: use an array to store the book information. Each book contains the book title (booktitle), author (author), publication date, and publishing house (pu Blishunit), lending quantity (lendnum), inventory quantity (stocknum) and other information. Write a program to input the information of several books, which are sorted by the year of publication and output. # Include <stdio. h> # include <stdlib. h> struct Data {int year; int month; int day;}; struct library {char booktitle [50]; char author [10]; struct Data; char publishunit [100]; int lendnum; int stocknum;}; int main () {int I, j, n, temp = 0; struct library book [n]; printf ("Enter the number of books to process: \ n"); fflush (stdout); scanf ("% d", & n); for (I = 0; I <n; I ++) {printf ("enter the information in the % d book: \ n", I + 1); printf ("title:"); ffl Ush (stdout); scanf ("% s", & book [I]. booktitle); printf ("Author:"); scanf ("% s", & book [I]. author); printf ("published by:"); scanf ("% s", & book [I]. data); printf ("Press:"); scanf ("% s", & book [I]. publishunit); printf (":"); scanf ("% s", & book [I]. lendnum); printf ("Quantity:"); scanf ("% s", & book [I]. stocknum) ;}for (I = 0; I <n-1; I ++) {for (j = I + 1; j <n; j ++) {if (book [I]. publishunit <book [j]. publishunit) {temp = Book [I]; book [I] = book [j]; book [j] = temp ;}} printf ("\ n sorted book information :"); for (I = 0; I <n; I ++) {printf ("\ n title: % s \ n, Author: % s \ n, published on: % s \ n, Publisher: % s \ n, lending quantity: % s \ n, inventory quantity: % s \ n ", book [I]. booktitle, book [I]. author, book [I]. data, book [I]. publishunit, book [I]. lendnum, book [I]. stocknum) ;}return EXIT_SUCCESS;} Question 9: write a program and use union to add, subtract, multiply, and divide two numbers. Each operation is completed using a function, consider how to implement multiple operations. Union yunsuan {int a; int B;} f; int add (int a, int B) {int sum = 0; f. a = a; sum + = f. a; f. B = B; sum + = f. b; printf ("% d \ n", sum); return sum;} int jian (int a, int B) {int sum = 0; f. a = a; sum-= f. a; f. B = B; sum-= f. B printf ("% d \ n", sum); return sum;} int cheng (int a, int B) {int sum = 0; f. a = a; sum * = f. a; f. B = B; sum * = f. B printf ("% d \ n", sum); return sum;} int chu (int a, int B) {int sum = 0; f. a = a; sum/= f. a; f. B = B; sum */= f. B printf ("% d \ n", sum); return sum ;}