In a digital system, two different clocks store time in hours and minutes. To analyze timing differences between events, the system needs to calculate the difference between the two clock times. A structure CLOCK is used to store hour and minute values for both clocks. The user enters the time of two clocks, and the program computes and displays the difference in time between them.
Hint: struct CLOCK { int hour; int minute; }
In a health survey system, the heights of two persons are recorded for comparison and analysis. Since height is measured in feet and inches, a structure named HEIGHT is used to store the values. The program takes the height of two persons as input, calculates the difference between their heights, and displays the result in feet and inches format.
Hint: struct HEIGHT { int feet; int inch; }
A college maintains academic records of N students using a structure-based system. Each student has a roll number and marks in three subjects: CPP, Java, and Android. The system stores all students’ data using an array of structures. For each student, total marks and percentage are calculated and stored. After processing all records, the program identifies and displays the student with the maximum total marks and the student with the minimum percentage.
Hint: struct STUDENT { int roll; float CPP,Java,android; float total,Per; }
6. A banking system calculates interest for customer deposits using structured data storage. The details of a customer such as principal amount, rate of interest, and time period are stored inside a structure. To efficiently access and modify these values, a pointer to structure is used. The program calculates simple interest using the structure pointer and displays the result on the screen.