Student Record System Project in C with Source Code

The Student Record System in C is a console-based application created using the C programming language. This system is a simple mini project and is compiled in the Code::Blocks IDE using the GCC compiler. In this project, you can add student details, mark sheets, search for students, edit students, and delete student records.

Moving on , this simple mini project for the Student Record Management System Project in C also includes a downloadable Student Record System Source Code for free. Just find the download button below and run the project.

However, this simple mini project for the Student Record System creates an external file to store the user’s data permanently to perform file handling operations. This is the features of Student Record System, which is the student information by adding, updating, removing, viewing and searching to perform the crud operations.

Anyway, the Student Record System console window screen is basically partitioned into 2 sections – one is static and it doesn’t change, while the other is dynamic and it changes occasionally. The content are coded utilizing different shading color related capacities to make them static.

Also, To improve your programming skills, particularly in the C/C++ programming language, check out this new article I wrote for you: Best C Projects for Beginners with Source Code – Free Download 2022.

Plus, read or visit other interesting languages used in student record management system.

To start creating a Student Record System In C , make sure that you have a Code Blocks or any platform of C installed in your computer.

Project Information and Recommended tools Used

ABOUT PROJECTPROJECT DETAILS
Project Name : Student Record System
Project Platform :C/C++
Programming Language Used:C Programming Language
Developer Name :itsourcecode.com
IDE Tool (Recommended):Dev-C++/Code blocks
Project Type :Console Application

What is a student records system?

“Student Record Management System (SRS), sometimes also referred to as Student Information System (SIS), Student Management System (SMS), or Student Information Management System (SIMS) – is a software solution for tracking and managing student data“.(According to What is The Student Record Management System? | Astria).

Why is student record management system important?

“When student records are added to an overall management information system that includes information on staff, materials, and budgeting for the school or school district, more management activities can be accomplished and efficiency will be improved“.(According to Description of a Student Record System : Building An Automated …).

How to create a student record management system in C?

Time needed: 5 minutes

Here are the step’s on how to create a student record system in C.

  • Step 1: Create a new project.

    First open the Code blocks IDE and click “Create a new project“.Creating project Student Record System in C with Source Code

  • Step 2: Choose console application.

    Second click the “console application” and after that click “next“.Click Console Student Record System in C with Source Code

  • Step 3: Choose C language.

    Third choose “C language” and click “next“.Choose C Student Record System in C with Source Code

  • Step 4: Name your project.

    Fourth name the project you’ve created and click “next” after that click “finish“.Naming Project Title C Student Record System in C with Source Code

  • Step 5: The actual programming codes

    Find the download button below and click the download button.

Modules and Function of the System

This function is for setting the foreground color.

In the code given below, which is for the function of setting a foreground color for the word “use in a console application window system and for printing.

void SetColor(int ForgC)
{
WORD wordcolor;
HANDLE studentHandleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO conscrbufinfo;
if(GetConsoleScreenBufferInfo(studentHandleOutput, &conscrbufinfo))
{
wordcolor = (conscrbufinfo.wAttributes & 0xF0) + (ForgC & 0x0F);
SetConsoleTextAttribute(studentHandleOutput, wordcolor);
}
return;
}

This function is for the adding student

In the code given below, which is for the function for adding a new student record in the database.

void adding_student(){
Reset_Window();
print_heading("Add New Student");
int print = 37;
FILE *openfile;
openfile = fopen("record.txt","ab+");
SetColor(45);
if(openfile == NULL){
MessageBox(0,"Error in Opening file\nMake sure your file is not write protected","Warning",0);
}else{ fflush(stdin); x_and_y_coordinates(print,10);printf("ID: ");gets(stu.stud_id); //here you can confirms the ID x_and_y_coordinates(print,12);printf("Name: ");gets(stu.stud_name); x_and_y_coordinates(print,14);printf("Address: ");gets(stu.stud_address); x_and_y_coordinates(print,16);printf("Parent's name: ");gets(stu.stud_parentName); x_and_y_coordinates(print,18);printf("Class: ");scanf("%d",&stu.stud_class); x_and_y_coordinates(print,20);printf("Contact Number: ");scanf("%ld",&stu.stud_contact_number); fwrite(&stu, sizeof(stu), 1, openfile); x_and_y_coordinates(40,22); printf("New Student is Added Successfully"); } SetColor(28); fclose(openfile); return;
}

This function is for the search student

In the code given below, which is for the function for searching a student in a database file, If you search for the correct id, it will show the record is found. If it is wrong, it will show there is no record found in the database.

void search_student(){
Reset_Window();
print_heading("Search Record");
SetColor(45);
char student_id[15];
int isFound = 0;
x_and_y_coordinates(37,10);printf("Enter ID to Search: ");fflush(stdin);
gets(student_id);
FILE *openfile;
openfile = fopen("record.txt","rb");
while(fread(&stu,sizeof(stu),1,openfile) == 1){
if(strcmp(student_id,stu.stud_id) == 0){
isFound = 1;
break;
}
}
if(isFound == 1){
x_and_y_coordinates(37,12);printf("The record is Found");
x_and_y_coordinates(37,14);printf("ID: %s",stu.stud_id);
x_and_y_coordinates(37,15);printf("Name: %s",stu.stud_name);
x_and_y_coordinates(37,16);printf("Address: %s",stu.stud_address);
x_and_y_coordinates(37,17);printf("Parent's Name: %s",stu.stud_parentName);
x_and_y_coordinates(37,18);printf("Class: %d",stu.stud_class);
x_and_y_coordinates(37,19);printf("Contact Number: %ld",stu.stud_contact_number);
}else{
x_and_y_coordinates(37,12);printf("No record found in the database");
}
SetColor(28);
fclose(openfile);
return;
}

Downloadable Source Code

Summary

That’s how you create Student Record System Project in C with Source Code in your projects. You can always expand and try different ways in implementing the Student Record System in C in your C projects. C is a powerful general purpose programming language.

It can be used to develop software like operating systems, databases, compilers, and so on. C programming is an excellent language to learn to program for beginners. Our C tutorials will guide you to learn C programming one step at a time. In this Student Record Management System in C with Source Code is free to download and It is easy to understand and manipulate this project and use for education purpose only.

Inquiries

If you have any questions or suggestions about Student Record Management System Project in C with Source Code  , please feel free to leave a comment below.

Leave a Comment