Explanatory Question
What is the structure?
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
struct structure_name { Member_variable1; Member_variable2 . . }[structure variables];
Output:#include struct student { char name[10]; // structure members declaration. int age; }s1; //structure variable int main() { printf("Enter the name"); scanf("%s",s1.name); printf("\n"); printf("Enter the age"); scanf("%d",&s1.age); printf("\n"); printf("Name and age of a student: %s,%d",s1.name,s1.age); return 0; }
Enter the name shikha Enter the age 26 Name and age of a student: shikha,26
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.