stru
stt
struct
structure
Answer is Wrong!
Answer is Right!
The correct answer is D. structure.
A structure is a user-defined data type that allows you to group together multiple variables of different data types. The keyword used to define a structure is struct.
For example, the following code defines a structure called
132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/>
Subscribe on YouTube
Person:
struct Person {
int id;
char *name;
float height;
};
A variable of type Person can then be declared as follows:
Person p;
The members of a structure can be accessed using the dot notation. For example, the following code prints the name of the person:
printf("%s\n", p.name);
Structures can also be used to define arrays. For example, the following code defines an array of 10 Person structures:
Person people[10];
The members of an array of structures can be accessed using the array index notation. For example, the following code prints the name of the first person in the array:
printf("%s\n", people[0].name);
Structures are a powerful tool that can be used to represent complex data types. They are often used in conjunction with other data types, such as arrays and pointers.