Birthday Reminder - Using C Programming Language


“Birthday Reminder” is a simple project where, you can add details (name, birth year, month, date and phone number) of anyone. Choosing the second option, you can view details of everyone. The third option “upcoming birthday” show the details of anyone whose birthday is within a week. Likewise you can modify and delete the details. The most important feature of this project is that, on startup, it shows the details of those whose birthday is within a month or following month.

  

How to download code?

  • Click here for source code.
  • New window will open where there is a source code of this project. You can download that code.
  • Run the the code.


 For more source code and tutorial, SUBSCRBE to my YouTube channel.


Development platform

Computer programming language (C programming language) has been used to develop this project.

 

Compiler

Dev C++ has been used as compiler. whose version is 5.11.

 

Header files

The header files that I have used in this project includes following header files

  1. Stdio
  2. Conio
  3. Time
  4. Windows
  5. String
  6. Unistd

 

Library function

The library functions used here includes :

  1. Under stdio header file
    1. Main
    2. Print
    3. Scanf
    4. Fflush
    5. Fopen
    6. Fclose
    7. Fread
    8. Fwrite
  2. Under stdlib header file
    1. Exit
  3. Under dos header file
    1. Delay
  4. Under conio header file
    1. Clrscr
    2. Getch
  5. Under string header file
    1. Strcmp
    2. Strupr
  6. Under ctype header file
    1. Isalpha
    2. Tolower
  7. Under Time header file
    1. Time
  8. Under unistd header file
    1. Sleep

 

Concepts used

Topics/ concepts of this language that you need to know for making this type of game :

  1. Array
  2. Function
    1. Void type
    2. Function returning value with no parameter
  3. Structure
  4. Pre-processor
  5. Looping statements
    1. For loop
    2. Do while loop
  6. Conditional statements
    1. If else 
    2. Switch case
  7. File handling


Logic description

First of  all, you must know about binary file handling to initiate this project. Here, all the data are stored in a binary format, and to manipulate them binary file handling concept is must.


On adding new details, new name is checked whether detail for that name is already present on a file. For this purpose, strcmp function can be used. When checking the presence of data in a file, we need to compare each lines of data till the end of file.


When showing the details of those whose birthday is within a week, the birth month and date is compared with the current date. The detail in which birth month is equal to current month and birth date is greater than current date or birth month is greater than current month just by one is shown.


On showing the detail of birthday person, it compares the birth month birth date with the current date and month. And details matching with the current date are shown on the screen.


For deleting purpose, the main concept behind this is : main file is opened along with one temporary file. All the details are copied to temporary file except the detail of provided name. Then it deletes the main file, and renames the temporary file with the name same that of main file.

No comments:

Post a Comment

Article Ad1