Essay on Personal Dairy Managment System

1276 Words Mar 15th, 2013 6 Pages
Term paper of programming in C On the topic of personal diary Management system (CAP502):-


INTRODUCTIONA diary is a record set (originally in handwritten format) with some type entries arranged with date, what has happened over the day or other period. A personal diary may include a person's experiences, which is hiding from others and thoughts or feelings, including comment on current events outside the writer's direct experience. Diaries undertaken for institutional purposes play a role in many aspects of human civilization, including government records. The term diary is some time called personal diaries, normally intended to remain private or to have a limited circulation amongst
…show more content…

getch(); break; } system("cls"); } } void addrecord() { FILE *fp ; char another = 'Y',time[10]; struct record e ; char filename[15]; int choice; { system("cls"); printf("\n\n\t\t***************************\n"); printf("\t\t* WELCOME TO THE ADD MENU *"); printf("\n\t\t***************************\n\n"); printf("\n\n\tENTER DATE OF YOUR RECORD:[yyyy-mm-dd]:"); fflush(stdin); gets(filename); fp = fopen (filename, "ab+" ); if ( fp == NULL ) { fp=fopen(filename,"wb+"); if(fp==NULL)

{ printf("\nSYSTEM ERROR..."); printf("\nPRESS ANY KEY TO EXIT"); getch(); return ; } } while ( another == 'Y'|| another=='y' ) { choice=0; fflush(stdin); printf ( "\n\tENTER TIME:[hh:mm]:"); scanf("%s",time); rewind(fp); while(fread(&e,sizeof(e),1,fp)==1) { if(strcmp(e.time,time)==0) { printf("\n\tTHE RECORD ALREADY EXISTS.\n"); choice=1; } } if(choice==0) { strcpy(e.time,time); printf("\tENTER NAME:");

fflush(stdin); gets(; fflush(stdin); printf("\tENTER PLACE:"); gets(; fflush(stdin); printf("\tENTER DURATION:"); gets(e.duration); fflush(stdin); printf("\tNOTE:"); gets(e.note); fwrite ( &e, sizeof ( e ), 1, fp ) ; printf("\nYOUR RECORD IS ADDED...\n"); } printf ( "\n\tADD ANOTHER RECORD...(Y/N) " ) ; fflush ( stdin ) ; another = getchar( ) ; } fclose ( fp ) ; printf("\n\n\tPRESS ANY KEY TO EXIT..."); getch(); } } void viewrecord( ) { FILE *fpte ;

struct record customer ; char time[6],choice,filename[14]; int ch; system("cls");

Related Documents