Term Paper CSE-101: Submitted To Submitted by
Term Paper CSE-101: Submitted To Submitted by
PAPER
CSE-101
Submitted to:
Mr. Mohit arora ( Deptt. Of COMPUTER)
Submitted by:
Amit kumar Roll.No.- RB6002A12 Reg.No- 11004528 Course- B.Tech-(ECE)
guidance of Mr. Mohit arora . This is my great experience of C programming to submit this project. I would like to thank my teacher , my friends,and other sources that gave an unending support and helped me in numerous ways from the first stage of my term assignment concieved.
1. INTRODUCTION 2. ADVANTAGES 3. SYSTEM REQUIREMENTS AND ANALYSIS 4. SOURCE CODE 5. OUTPUT 6. FUTURE SCOPE OF PROJECT 7. REFERENCES
INTRODUCTION
C is a programming language developed at AT &Ts bell laboratories of USA in 1972.It was deigned by Dennis Retchie. This project of BOOK STORE MANAGEMENT SYSTEM gives us the complete information about the storage of books.We can enter the record of new books and retrieve the details of books available .We can issue the books to the student and maintain their records and can also check available . number of books issued and stock
The book store Management system is designed & developed for a receipt and issuance of books along with the students details.The books received in this system are entered in books entry form.When the student wants to get the desired books the same is issued on the availability basis to the student. This program helps us to do many further aspects in the future.~~~~!!!!!!
Advantages:-There are many advantages of this system whose name is book store management System This system
process made computerized to reduce human errors and to increase the efficiency.The main focus of this project is to lesson human efforts.The maintenance of the records is made efficient, as all the record are stored in the access database, through which data can be retrieved easily.
2.
3.
4.
If a name exceeds 25 characters, the first 25 characters are taken. This is the publication year.
5. 6.
Up to 25 character Like mathematics, physics chemistry in length etc. Up to 15 character Id of the person who has currently in length borrowed it.
7.
Borrowers user Id
Source Code :
#include<stdio.h> #include<dos.h> #include<ctype.h> #include<stdlib.h> #include<string.h> #define nm 20 #define cal 2 #define idn 5 #define dt 2 void chk_name(char *p,int); void chk_id(char *p,int); int duplicate(char temp[]); int duplicatest(char temp[]); void studinfo(); void issue(); void returned(); void viewstfo(); void view1(); void stuissue(); struct lib { char bname[nm]; char bid[idn]; } lib1; struct isue { char sid[idn]; char bid[idn]; int isdate; int redate; } iss1;
char bid[idn]; int redate; } ret1; struct st { char sid[idn]; char sname[nm]; //struct lib lib2; //struct isue iss2; //struct ret ret2; } st1; void main() { clrscr(); gotoxy(1,1); do { printf("\nThis is book store management\n1.Issue book\n2.Return book\n3.View issued books\n4.Student info\n5.View student info\n6.Exit\n7.Issued by one student "); scanf("%d",&choice); switch(choice) { case 1: issue(); break; case 2: returned(); break; case 3: view1(); break; case 4: studinfo(); break; case 5: viewstfo(); break; case 6: exit(0); case 7: stuissue(); break; default: printf("One among 1,2,3,4"); getch(); } int choice;
char temp[idn];
char btemp[idn]; FILE *fp; fp=fopen("boissue.rec","ab"); printf("\nEnter book id:"); chk_id(btemp,idn); strcpy(iss1.bid,btemp); { getdate(&d); printf("\nTodays date:%d",d.da_day); iss1.isdate=d.da_day; } iss1.redate=iss1.isdate+10; struct date d;
printf("\nEnter student's ID:"); chk_id(temp,idn); strcpy(iss1.sid,temp); fwrite(&iss1,sizeof(iss1),1,fp); printf("\nINfo saved , can be issued"); printf("\nExpected date of return is comming: %d",iss1.redate); } { int ch; FILE *fp; fp=fopen("boissue.rec","rb"); printf("Enter book's code:"); chk_id(temp,idn); void returned() char temp[idn];
} void chk_name(char *p,int size) { int i=0; do { ch=getch(); if(((ch>='a' && ch<='z')||(ch==' ')||(ch>='A'&& ch<='Z'))&&(i<size-1)) { i++; printf("%c",ch); } else if(ch==8 &&i>0) { i--; p--; } } while(ch!=13); printf("%c%c%c",8,32,8); *p++=ch; char ch,c[30];
c[i]='\0'; *p='\0'; } { int i=0; do { ch=getch(); void chk_id(char *p,int size) char ch;
{ i++; p++;
*p=ch;
printf("%c",ch); } else if(ch==8 &&i>0) { i--; p--; } } *p='\0'; } int duplicate(char temp[]) { FILE *fp; fp=fopen("boissue.rec","rb"); while(fread(&iss1,sizeof(iss1),1,fp)&&strcmp(iss1.sid,temp)); while(ch!=13 || i<size-1); printf("%c%c%c",8,32,8);
fclose(fp); if(strcmp(temp,iss1.sid)==0) return 1; else return 0; } { FILE *fp; fp=fopen("boissue.rec","rb"); int ch;
if(fp!=NULL) { while(fread(&iss1,sizeof(iss1),1,fp))
if(strcmp(iss1.sid," ")!=0) { printf("\nStudent ID:%s date:%d\n",iss1.sid,iss1.bid,iss1.isdate,iss1.redate); } if(strcmp(iss1.sid," ")==NULL) { else printf("Not found"); }} Book ID:%s Issue date:%d Due return
if(fp!=NULL) { fp=fopen("studinfo.rec","ab"); do { printf("\nEnter unique student ID:"); chk_id(temp,idn); } strcpy(st1.sid,temp); printf("\nEnter student's name:"); chk_name(st1.sname,nm); fwrite(&st1,sizeof(st1),1,fp); fclose(fp); while(duplicatest(temp));
fp=fopen("studinfo.rec","rb"); while(fread(&st1,sizeof(st1),1,fp)&&strcmp(st1.sid,temp)); if(strcmp(st1.sid,temp)==0) { else return 0; } { FILE *fp; fp=fopen("studinfo.rec","rb"); int ch; void viewstfo() return 1; }
fclose(fp); } { else
fp=fopen("boissue.rec","rb"); f=fopen("studinfo.rec","rb"); if(fp!=NULL) { while(fread(&iss1,sizeof(iss1),1,fp)&&fread(&st1,sizeof(st1),1,f)) if((iss1.sid," ")!=0) if(strcmp(iss1.sid,st1.sid)==0) { printf("\nStudent ID:%s Book ID:%s Student) } Issue date:%d Due return date:%d
OUTPUT:-This is book store management 1. Issue book 2. return book 3. view issued books 4. student informations 5. view student information
case 1: book issue.c enter book id : 1234 today date is : 21 09 08 enter student id : 2343 information saved , can be issue expected date of return is coming : 21 09 08
REFRENCES
1 ANSI C
2 ANSI C 3 LAZOS 1994 4 KELLS ,KARN AND BLAND 1943 5 SCHUMIDHUBER 6 WWW.SOURCECODE WORLD.COM 7WWW.PLANETSOURCE.COM 8 WWW.DREAMCODE.NET.COM
BALAGURUSWAMI
KAMTHANI