Add to Favorites    Make Home Page 21129 Online  
 Language Categories  
 Our Services  

Home » C Home » File Operations Home » Birth Day Reminder Utility

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title Birth Day Reminder Utility
Author Rudra Dev G
Author Email kakatiyarudra [at] yahoo.co.in
Description THIS PROGRAME IS USEFUL FOR REMIDING BIRTHDAYS

Category C » File Operations
Hits 15076
Code Select and Copy the Code
Code : /* Run this application from windows scheduled tasks when we login */ /* Create <bdays.dat> file in same folder */ #include <stdio.h> #include <string.h> #include <time.h> #include <conio.h> #include <dos.h> void display(void); int append(void); void errmsg(void); FILE *fp; struct student { /* File structure */ char name[34],d[3],m[3]; }stud; struct tm *ptr,tt; time_t lt; int td,tm; /* for storing todays day and month*/ char ch; char n[3]; int m; /* no of appends */ int count=0,count2=0,ch_count=0; void main(void) { display(); if(append()){ count2=0; display(); getch(); } printf(" This program is designed by : Rudra Dev Gudipati "); printf("E-mail: grdreddy@rediffmail.com"); getch(); } void display(void) { clrscr(); gotoxy(20,5); printf("??Todays Birth Day Buds?????????????? "); gotoxy(20,6); printf("????????????????????????????????????? "); fp=fopen("bdays.dat","r"); do{ count++; lt=time(NULL); ptr=localtime(<); tt=*ptr; td=tt.tm_mday; tm=tt.tm_mon+1; fscanf(fp,"%30s %2s %2s ",stud.name,stud.d,stud.m); if(td==atoi(stud.d) && tm==atoi(stud.m)){ gotoxy(20,7+count2); printf("? ? "); sound(100); delay(10000); nosound(); gotoxy(22,7+count2); puts(stud.name); count2++; delay(32000); delay(32000); } } while(!feof(fp)); gotoxy(20,7+count2); printf("????????????????????????????????????? "); fclose(fp); } int append(void) { char fname[34]; int t; puts(" Do u wish to append data base y/n ?"); ch=getch(); clrscr(); if(ch=='y') { for(t=0;t<=100;t++){ sound(t*10); delay(t*20); nosound(); } t=0; gotoxy(15,2); puts(" Number of new entries(1-15 only) :"); FLA: gotoxy(54,2); printf(" "); gotoxy(54,2); gets(n); m=atoi(n); if(m>15 || m<0) { errmsg(); goto FLA; } gotoxy(10,4); printf("??Append Window?????????????????????????????????????? "); gotoxy(10,5); printf("????????????????????????????????????????????????????? "); gotoxy(10,6); printf("? Name Date Month ? "); gotoxy(10,7); printf("????????????????????????????????????????????????????? "); for(t=1;t<=m;t++) { gotoxy(10,7+t); delay(30000); sound(300); delay(30000); nosound(); printf("? | ? "); } gotoxy(10,7+t); printf("????????????????????????????????????????????????????? "); t=8; while(m>0) { fflush(fp); fp=fopen("bdays.dat","a+"); NLA: gotoxy(12,t); gets(fname); if(strlen(fname)==0){ errmsg(); goto NLA; } for(ch_count=0;ch_count<29;ch_count++) stud.name[ch_count]=fname[ch_count]; stud.name[ch_count]='<strlen(stud.name);ch_count++) if(stud.name[ch_count]==' ') stud.name[ch_count]='_'; DLA: gotoxy(49,t); puts(" "); gotoxy(49,t); gets(stud.d); ch_count=atoi(stud.d); if(ch_count<1 || ch_count>31) { errmsg(); goto DLA; } MLA: gotoxy(55,t); puts(" "); gotoxy(55,t); gets(stud.m); ch_count=atoi(stud.m); if(ch_count<1 || ch_count>12) { errmsg(); goto MLA; } fprintf(fp,"%30s %2s %2s ",stud.name,stud.d,stud.m); m--; t++; } /* end of while*/ fclose(fp); } if(ch=='y') return (1); else return (0); } void errmsg(void) { gotoxy(15,24); printf("Invalid Entry Press ENTER Key to contiune"); sound(1000); sleep(1); nosound(); getchar(); gotoxy(15,24); printf(" "); } a combination of the above tw

Related Source Codes

Script Name Author
The Game Opposite as seen on Nokia 2300 Mobile Manikanta
RECURSIVE BALANCED QUICK SORT ashish
Radix Sort ashish
Change your mouse pointer Ashim
The blinking star Shashank
Data Validation Crylittlebaby
To search a file by giving file type like mp3 or mpeg or doc Prashanth SR
Menus Demonstration B.Chidhambaram
Employee Database Project Using C. Reenku Raman Nayak
Creating a Lexical Analyzer in c fahad bader al-buhairi դ ? ??
Calendar Program Omkar & Devendra
Stop double Process for start in C Cedrik Jurak
Stop double Process for start in C Cedrik Jurak
Time Scheduler Atiq Anwar
A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions
Copyright ©2003-2017 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=1049


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review