Westonci.ca makes finding answers easy, with a community of experts ready to provide you with the information you seek. Discover detailed solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.

A structure, in C, has been given by: struct MYSTRUCT { char buf[15] shorts S int i; } * Select the proper keywords in the proper order) needed to declare, in C, an array of 8 structures (called MYSTR) of type MYSTRUCT. * Choose the following the expression for accessing Element 4 (i.e., index 4) of the char array (BUF) in the third element (i.e., index 3) of MYSTR. * Choose the statement to declare, in C, a pointer called MYSPTR that points to a structure of type MYSTRUCT. * Select the proper method to access the short, S, in a structure pointed to by MYSPTR by de-referencing the pointer.*Select the proper method to access the short, S, in a structure pointed to by MYSPTR by using the shorthand notation.

Sagot :

Answer:

MYSTRUCT myStruct[8]; // statemnt to create an array of struct variables

myStruct[3].buf[4] // statement to access the fourth element of the array of the struct variables.

struct * MYSPTR = &myStruct; // This statement creates a pointer.

To dereference and access the S variable of the struct data structure in the array;

(*MYSPTR).S and its shorthand notation MYSPTR -> S

Explanation:

A structure is a data structure in C language that is used to hold descriptive data of an object. The keyword struct is used to create the structure. An array of struct holds instances of a struct variable, where each struct can be accessed using the regular array indexing and the variables of the structs in the array can be accessed using dot notation.