--:--









Quiz for Array of structures

Course: C Language | Subject: Unit 7 | Topic: Structures and Unions



Logo

Q1: How do you declare an array of 10 structures named "students" of type "struct Student"?

Logo

Q2: How do you access the "age" member of the 5th element in a structure array "students"?

Logo

Q3: What is the index of the first element in a structure array in C?

Logo

Q4: Which of the following correctly assigns the "marks" member of the 3rd element in "arr"?

Logo

Q5: How to initialize the first element of a structure array "arr" with name="John" and age=20?

Logo

Q6: How do you pass an array of structures to a function expecting "struct Student *"?

Logo

Q7: Which operator is used to access members of structures in an array?

Logo

Q8: Is this declaration valid? "struct Point pts[5];"?

Logo

Q9: How to assign the entire structure to an element of the array?

Logo

Q10: Can arrays of structures be initialized partially?

Logo

Q11: What is the memory layout of an array of structures?

Logo

Q12: Can a structure array contain elements of different sizes?

Logo

Q13: Which header is required to use memset to initialize a structure array?

Logo

Q14: What happens if you access out-of-bounds index of a structure array?

Logo

Q15: How to get the address of the 4th element in a structure array "arr"?

Logo

Q16: What is the type of "arr" if declared as "struct Student arr[10];"?

Logo

Q17: Which function prototype correctly takes a structure array and its size?

Logo

Q18: Can an array of structures be returned from a function?

Logo

Q19: How to iterate over an array of structures using a pointer?

Are you ready to start test? Set your time limit