Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:42:07+00:00 2026-06-01T03:42:07+00:00

this is a b-day reminder code utilizing linkedlists typedef struct node { char name[61];

  • 0

this is a b-day reminder code utilizing linkedlists

typedef struct node  
{  
    char name[61];  
    int month;          int day;  
    int year;  
    struct node *next;  
}node;  

this is the list

typedef struct list  
{  
    node *head;  
    node *tail;  
}list;  

this is the create list code

list *create_list(list *plist)  
{  
    plist->head = NULL;  
    plist->tail = NULL;  
    return plist;  
}  

this inserts the node created to the list

list *insert_list(list *plist, node *pnode, node *new_node)  
{  
    new_node->next = pnode->next;  
    pnode->next = new_node;  
    if (plist->tail == pnode)  
    {  
            plist->tail = new_node;  
    }  
}  

this is the add birthday menu

void add_birthday(list *List)  
{  
    char x;  
    node *data = (node *) malloc(sizeof(node));  
    List = (list*) malloc(sizeof(list));  
    printf("******************************************************************\n");  
    printf("                    ADD BIRTHDAY REMINDER FORM\n");  
    printf("******************************************************************\n");  
    List = insert_list(List, data, create_node(data));  
    printf("Would you like to add another(y/n)?\n");  
    scanf("%c", &x);  
    if (x=='y')  
    {  
            while (x=='y')  
            {  
                    if (x=='y')  
                    {  
                            getchar();  
                            printf("******************************************************************\n");  
                            node *data = (node *) malloc(sizeof(node));  
                            List = insert_list(List, data, create_node(data));  
                            printf("Would you like to add another(y/n)?\n");  
                            scanf("%c", &x);  
                    }  
            }  
    }
    main_menu(List);  //the problem lies here
}  

this is the main menu

void main_menu(list* List)  
{  
    int x;  
    printf("Welcome to myCalendar version 1.0.0\n");  
    printf("Please input the number that you wish to do:\n");  
    printf("[1] Add Birthday Reminder\n");  
    printf("[2] Delete Birthday Reminder\n");  
    printf("[3] View Calendar\n");  
    printf("[4] Quit\n");  
    scanf("%d", &x);  
    getchar();  
    switch (x)  
    {  
            case 1:  
                    add_birthday(List);  
                    break;  
            case 2:  
                    delete_reminder(List);  
                    break;  
            case 3:  
                    view_calendar(List);  
                    break;  
            case 4:  
                    free(List);  
                    break;  
        }  
}

this is the main

int main(void)  
{  
    list* List = (list*) malloc(sizeof(list));  
    List = create_list(List);  
    main_menu(List);  
    return 0;  
}  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:42:10+00:00Added an answer on June 1, 2026 at 3:42 am

    Is the definition of main_menu() is after add_birthday()? If yes define main_menu() before add_birthday(). Also define all the methods before main() or atleast declare them before main().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The other day this code was working. I changed some things and re-ran it
How can I find first day of the next month and the remaining days
Throughout this day I've been investing time into fingerprint matching/recognition algorithms/implementations in the world
I knew this day would come, so I guess it is here. (P.S. I
Well, I guess this day had to come. My client's website has been compromised
I'm trying to get the four or five things that happened on this day
I am a predominantly PHP developer. I realize in this day and age specialization
I've struggled with this all day, I am trying to get a random number
I have been struggling with this all day. I have an html table in
This is the day of weird behavior. We have a Win32 project made with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.