Structures
Structures
Q.No.1: Create a structure of type “date” that contains three members: the
month, the day of the month, and the year, all of type int. Have the user enter a
date in the format 12/31/2001, store it in a variable of type struct date ,then
retrieve the values from the variable and print them out in the same format.
Q.NO.2: write a Program that declares a structure “distance” covered by an
player along with minutes and seconds to cover the distance. The program
should input the record of two players and display the record of winner.
Q.NO.3: Write a Program that declares a structure to store ten values in the
Array. It defines a structure variable, input the values and display Maximum
value using “Array as Member Variable”.
Q.No.4: Write a Program that uses two structures Result and Record. The
result structure stores marks and grade, record structure stores roll no and
Result type. The program declares a variable of type Record, inputs roll no,
marks and grade. It finally displays these values on the screen.
Q.No.5: Write a Program that explains the concepts of “Array as a Member
variable” and “Array as a Structure variable” in structure.
Good Luck