C Program
C Program
FOR ATTENDANCE
MAKING A ATTENDANCE REGISTER BY MAKING A PROGRAM IN C
A N AT T E N D A N C E S Y S T E M I N C I S A
SIMPLE CONSOLE-BASED PROJECT
T H AT A L L O W S A U S E R T O M A R K
AT T E N D A N C E A N D M A I N TA I N A
•Adding New Records: Adding new entries for students/employees who are present.
•Viewing Records: Viewing the attendance list, which shows who attended on a particular day or in a specific timeframe.
•Storing Data: Storing the attendance data in a file so that it can be retrieved later.
•Basic Reports: Simple analysis such as checking attendance percentage, total days attended, etc. 3
OUTLINE OF THE PROGRAM
Data
• markAttendance(): This function allows marking a student as present or absent based on the
roll number.
• menu(): Displays the main menu and calls the appropriate function based on user choice. 5
MAIN
PROGRAM
LOGIC
The main logic will use a menu-driven approach
allowing the user to select an option (e.g., add a
student, mark attendance, or view attendance).
6
•Struct Definition:
EXPLANATION •The Student struct holds three fields: roll number, name,
and attendance status (0 for absent, 1 for present).
OF
THE PROGRAM •Array of Students:
•The array students[] stores all student records. The variable
student_count keeps track of how many students have been
added.
•add Student() Function:
•Prompts the user to enter the student's roll number and name. This data is then stored in the students[] array.
•markAttendance() Function:
•Takes the roll number as input, searches for the student, and marks them either present or absent.
•viewAttendance() Function:
•menu() Function:
•Provides a simple interface for users to interact with the system by selecting options to add students, mark attendance, or view the attendance list.
7
CONCLUSION :
This basic C program for an attendance system can be expanded with more
features
attendance reports.