C Report Assigment
C Report Assigment
C Report Assigment
By
1|Page
Submitted To Richa Jain Ma’am
Lovely Professional University
ACKNOWLEDGEMENT
My profound gratitude goes out to Richa Jain Ma'am, the CSE 101 instructor, for
giving me the chance to work on the project of creating a student attendance
calculator.
She was a great help during the project, and I want to thank her for that. Her
knowledge of the topic, along with her readiness to offer suggestions and respond
to our inquiries, enabled me to effectively complete the project.
Finally, I want to thank the university for giving me the tools I needed to complete
this research. I am appreciative that I had the chance to work on this project
because it has been a great opportunity for me to learn.
2|Page
TABLE OF CONTENT
1) Chapter 1 – Introduction………………………………………………
a. Overview of C
2) Chapter 2 – Implementation…………………………………………..
a. Methodology
b. Level 0 DFD
3) Chapter 3 – Pictorial…………………………………………………..
a. Representation of Project
4) Chapter 4 – Code……………………………………………………...
5) Conclusion…………………………………………………………….
3|Page
CHAPTER - 1
INTRODUCTION
Overview of C
C is a high-level, procedural programming language that was developed in the
early 1970s by Dennis Ritchie at Bell Labs. It is a general-purpose programming
language that is widely used in system programming, embedded systems, and
scientific computing. C is a compiled language, which means that the source code
is compiled into machine code before execution, making it faster and more
efficient than interpreted languages.
C is known for its simplicity and efficiency, as well as its low-level control over
computer hardware. It provides a set of powerful features for memory
management, including pointers, which allow programmers to directly manipulate
memory addresses. This makes C an ideal choice for programming operating
systems and device drivers, where low-level hardware access is critical.
One of the key features of C is its portability. C programs can be written on one
platform and compiled to run on another platform with little or no modification.
This is because C is designed to be architecture-independent, meaning that the
same code can be compiled and run on different hardware architectures without
modification.
C has influenced many other programming languages, including C++, Java, and
Python. C++ is an extension of C that adds object-oriented programming features,
while Java is a high-level, object-oriented language that is based on C++. Python is
a high-level scripting language that is used for rapid application development, data
analysis, and scientific computing.
4|Page
Introduction of the Project
The program uses a struct to store student information such as name, roll number,
attendance for each course, and total attendance. The program can calculate the
total attendance of each student by taking the sum of the attended classes divided
by the total classes for each course and calculating the average.
The program provides the option to search for students by roll number or name and
display their attendance information. It also provides a warning message for
students with attendance below 75%. The program uses arrays to store and
manipulate student information, with a maximum of 100 students and 8 courses.
The program uses basic input/output functions such as printf, scanf, and gets to
interact with the user. It also uses string and math libraries for string and arithmetic
operations. The code is well-structured and organized with meaningful function
names and comments. Overall, this program provides a useful tool for tracking and
managing student attendance records.
5|Page
CHAPTER - 2
IMPLEMENTATION
Methodology
1) Libraries
a) Three common C libraries are used in the code: string.h, stdlib.h, and
stdio.h.
b) Input and output operations like printf() and scanf are performed using
stdio.h ().
d) String manipulation techniques like strcmp are performed using the string.h
library ().
2) Constants
3) Structures
6|Page
a) A structure called student is defined in the code, and it maintains
information about each student, such as name, roll number, attendance for
each course, and overall attendance. The information about every student
introduced to the system is contained in the struct student, which is an array
of structures students.
4) Variables
a) The integer variable total _students store the overall number of students
added to the system.
b) The login credentials are stored in character arrays called username and
password.
d) The float variables attendance and total attendance are utilized in a variety of
functions.
Functions
1. login ()
The user's login credentials are verified using the login() function. It asks the user
to provide a username and password and then confirms that the entered
information corresponds to the pre-defined information. It returns 1 to indicate a
successful login if the credentials match; else, it returns 0 to indicate an
unsuccessful login.
2. add_student ()
7|Page
To enter a new student's information into the system, use the insert student()
function. For each course, the user is prompted to enter the student's name, roll
number, and attendance. The total attendance field of the student's structure is
where it maintains the attendance total for each student after computing it. It
displays a warning message if the student has less than 75% overall attendance.
The student's information is added to the students array.
3. display_students()
All of the student information entered into the system is displayed using the
display students() function. It displays the total new enrollment, along with each
student's name, roll number, overall attendance, and attendance for each course.
4. search_student_by_roll_number()
To find a student's information by their roll number, use the search_student _by
_roll _number() function. The user is prompted to provide the roll number before it
searches the students array for the student's information. When a student is located,
their name, roll number, and attendance for each course are displayed. If not, a
notice stating that the student was not found is displayed.
5. student_search_by_name()
6. update_attendance()
A student's attendance for a particular course can be updated using the update
attendance() function. While updating attendance for a course, the user is prompted
to enter the course code and the student's roll number. After then, the user is
prompted to enter the updated attendance value. The student's attendance for the
chosen course is updated, and the student's overall attendance is recalculated, if the
8|Page
student is located and the new attendance figure is valid. A warning notice is sent
if the revised attendance figure results in a decrease in the student's overall
attendance below 75%.
7. delete_student()
To remove a student's information from the system, use the delete student()
function. The user is prompted for the student's roll number before it searches the
student array for the student's information. The student's information is deleted
from the students array if the student is located.
8. exit_program()
To end the programme, use the exit program() function. The software is terminated
once a notice stating that it is quitting is displayed.
9.File handling
The software can use file handling to save and load student data to and from files.
The programmer stores the student data in a CSV (comma-separated values) file.
The student's name, roll number, and attendance for each course are all kept in the
CSV file.
The programmer first determines whether the current working directory has the file
"students.csv" when it launches. If the file is there, the application uses file
handling routines to load the student data into the students array. The programmer
initialises the students array to an empty list if the file does not exist.
When a user uses the insert student() function to add a new student, the software
appends the new student's data to the students array and then uses file handling
functions to write the updated data to the CSV file. Similar to this, the software
receives the data from the CSV file using file handling functions and prints the
data to the console when the user examines the student data using the display
students() function.
9|Page
The software may persist the data even after it is closed and restarted by using file
handling to store and retrieve the student data to and from a file.
Level 0 DFD
10 | P a g e
CHAPTER – 3
11 | P a g e
fig. One
When correct username and password is entered
fig. Two
12 | P a g e
fig. Four
13 | P a g e
fig. Five
fig. Six
Selecting Option 3 For viewing student attendance using roll number
fig. Seven
When entered roll number isn’t in the database.
14 | P a g e
fig. Eight
Selecting Option 4, For viewing student attendance using Name.
fig. Nine
Selecting Option 5, To calculate attendance of Student without saving his/her information in Database
15 | P a g e
fig. Ten
Selecting Option 6, To delete Information of particular information from Database.
fig. Eleven
Selecting Option 7, To modify information of particular student
fig. Twelve
16 | P a g e
fig. Thirteen
Selecting Option 9, To Exit.
CHAPTER - 4
17 | P a g e
CODE
Snippet 1
18 | P a g e
Snippet 2
19 | P a g e
CONCLUSION
Ultimately, these features combine to offer a fundamental student management
system. The user has access to updating attendance, adding new students, seeing all
students, searching for students by name or roll number, deleting students, and
exiting the software after logging in. While being a simple system, it serves as an
excellent foundation for creating more intricate student management systems.
A password generator is a software application device that creates arbitrary or
tailored passwords for
individuals. It assists individuals to produce more powerful passwords that offer
greater protection
for a provided sort of access. Some password generators are merely random
password generators.
These programs produce complex/strong passwords with mixes of numbers,
uppercase and also
lowercase letters, and also unique personalities such as dental braces, asterisks,
slashes, and so on.
It is a tool that generates passwords based on the given guidelines that you set to
create an
unpredictable strong password for your account
20 | P a g e