Student Database Management System
Student Database Management System
Student Database Management System
Project Report
C++
Student Database
Management
System
Submitted to:
Submitted by:
Roll.
No:- 1010270441
Class-
PGDCA
ACKNOWLEDGEMENT
I take this opportunity to express my
gratitude to our guide and lab incharge who
encourage me with her critical and constructive
suggestions in the project work.
I am also thankful to my guide MY MAM for
her valuable guidance in this project successfully.
She benefited me with her experience skill in the
project.
I again thank to all for their support and
encouragement.
INTRODUCTION
C++ programming helps us in finding the
solution of the problems by the computer
language, by preparing the C++ program
codes. As same in this program of the address
book we have given a statement in the
execution screen to enter the address of the
employee or any personal address. In this
program I used structures and if-else loops with
the help of switch case and for loops.
This program helps us to do many further
aspects in the future.
System Requirements:--
following things:--
resolution….
database
management system
using three or more than three header files or many data types such as:
there are many header files which are used in this program….
many more…..
3. #include<math.h>: this header file will contain power
function such as :
a. Strrev();
b. Strlen();
c. Strupr();
d. Strlwr();
Source code
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
#include <iomanip.h>
main () {
struct student {
char course[100];
int section;
};
struct student e;
if (fp == NULL) {
fp = fopen("users.txt","wb+");
if (fp==NULL)
return 0;
recsize = sizeof(e);
while(1) {
system("cls");
clrscr();
Cout << "\t\t======= STUDENT INFORMATION SYSTEM
========";
fflush(stdin);
choice = getche();
switch(choice)
case '1' :
fseek(fp,0,SEEK_END);
another ='Y';
while(another == 'Y' || another == 'y')
system("cls");
fwrite(&e,recsize,1,fp);
fflush(stdin);
another = getchar();
break;
case '2':
system("cls");
rewind(fp);
===";
e.last_name;
system("pause");
break;
case '3' :
system("cls");
another = 'Y';
cout << "\n Enter the last name of the student : ";
rewind(fp);
while (fread(&e,recsize,1,fp) == 1)
if (strcmp(e.last_name,xlast_name) == 0)
fwrite(&e,recsize,1,fp);
break;
fflush(stdin);
another = getchar();
break;
case '4':
system("cls");
another = 'Y';
{
cout << "\n Enter the last name of the student to delete : ";
ft = fopen("temp.dat", "wb");
rewind(fp);
if (strcmp(e.last_name,xlast_name) != 0)
fwrite(&e,recsize,1,ft);
fclose(fp);
fclose(ft);
remove("users.txt");
rename("temp.dat","users.txt");
fp=fopen("users.txt","rb+");
cout << "\n Delete Another Record (Y/N) ";
fflush(stdin);
another = getchar();
break;
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
#include <iomanip.h>
main() {
FILE *fp, *ft;
struct student {
char course[100];
int section;
};
struct student e;
fp=fopen("users.txt","rb+");
if (fp == NULL) {
fp = fopen("users.txt","wb+");
if (fp==NULL)
return 0;
recsize = sizeof(e);
while(1) {
system("cls");
clrscr();
========";
fflush(stdin);
choice = getche();
switch(choice)
case '1' :
fseek(fp,0,SEEK_END);
another ='Y';
system("cls");
fwrite(&e,recsize,1,fp);
fflush(stdin);
another = getchar();
break;
case '2':
system("cls");
rewind(fp);
===";
while (fread(&e,recsize,1,fp) == 1)
{6fyy536ujh5u6786fyy536ujh5u
6fyy536ujh5u6786fyy536ujh5u67867u
e.last_name;
system("pause");
break;
case '3' :
system("cls");
another = 'Y';
cout << "\n Enter the last name of the student : ";
rewind(fp);
while (fread(&e,recsize,1,fp) == 1)
{
if (strcmp(e.last_name,xlast_name) == 0)
fwrite(&e,recsize,1,fp);
break;
fflush(stdin);
another = getchar();
break;
case '4':
system("cls");
another = 'Y';
cout << "\n Enter the last name of the student to delete : ";
ft = fopen("temp.dat", "wb");
rewind(fp);
fwrite(&e,recsize,1,ft);
fclose(fp);
fclose(ft);
remove("users.txt");
rename("temp.dat","users.txt");
fp=fopen("users.txt","rb+");
fclose(fp);
exit(0);
}
}
system("pause");