123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Birth Day Reminder Utility

--------------------------------------------------------------------------------

Description : THIS PROGRAME IS USEFUL FOR REMIDING BIRTHDAYS

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<BR>);
printf("E-mail: grdreddy@rediffmail.com");
getch();

}

void display(void) {
clrscr();
gotoxy(20,5);
printf("╔═Todays Birth Day Buds═════════════╗<BR>);
gotoxy(20,6);
printf("║───────────────────────────────────║<BR>);
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 <BR>,stud.name,stud.d,stud.m);
if(td==atoi(stud.d) && tm==atoi(stud.m)){
gotoxy(20,7+count2);
printf("║ ║<BR>);
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("╚═══════════════════════════════════╝<BR>);
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═════════════════════════════════════╗<BR>);
gotoxy(10,5);
printf("║───────────────────────────────────────────────────║<BR>);
gotoxy(10,6);
printf("║ Name Date Month ║<BR>);
gotoxy(10,7);
printf("║───────────────────────────────────────────────────║<BR>);
for(t=1;t<=m;t++) {
gotoxy(10,7+t);
delay(30000);
sound(300);
delay(30000);
nosound();
printf("║ | ║<BR>);
}
gotoxy(10,7+t);
printf("╚═══════════════════════════════════════════════════╝<BR>);
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]='
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved ę copyright 123ENG