0% found this document useful (0 votes)
18 views1 page

Structures

The document contains instructions for 5 questions on a lab performance exam. The questions involve creating and using structures to store date values, distance and time records for athletes, storing arrays of values within structures, and using structures within structures to store student records with marks and grades.

Uploaded by

Shahzad Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Structures

The document contains instructions for 5 questions on a lab performance exam. The questions involve creating and using structures to store date values, distance and time records for athletes, storing arrays of values within structures, and using structures within structures to store student records with marks and grades.

Uploaded by

Shahzad Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab Performance [Marks=20] [Time=60 Min]

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

You might also like