Dynamic Linked Lists and File Manipulation/assign5.c
int menu(){
    
    char choiceStr[2];
    int choice = 0;
    
    puts("");
    puts("1. Add Student");
    puts("2. Delete Student");
    puts("3. Display Students");
    puts("4. Search Student");
    puts("5. Save");
    puts("6. Exit");
    
    printf("%s", "Choice: ");
    scanf("%1s", choiceStr);
    getchar();
    
    choice = strtol(choiceStr, NULL, 10);
    
    return (int) choice;
}
/*
    menu: displays a menu and prompt to the user
    output: the choice made by user
*/
displays a menu and prompt to the user
output: the choice made by user
displays a menu and prompt to the user output : the choice made by user
int menu(){
    char choiceStr[2];
    int choice = 0;
    puts("");
    puts("1. Add Student");
    puts("2. Delete Student");
    puts("3. Display Students");
    puts("4. Search Student");
    puts("5. Save");
    puts("6. Exit");
    printf("%s", "Choice: ");
    scanf("%1s", choiceStr);
    getchar();
    choice = strtol(choiceStr, NULL, 10);
    return (int) choice;
}
int menu ( ) { char choiceStr [ 2 ] ; int choice = 0 ; puts ( " " ) ; puts ( " " ) ; puts ( " " ) ; puts ( " " ) ; puts ( " " ) ; puts ( " " ) ; puts ( " " ) ; printf ( " " , " " ) ; scanf ( " " , choiceStr ) ; getchar ( ) ; choice = strtol ( choiceStr , NULL , 10 ) ; return ( int ) choice ; }
menu: displays a menu and prompt to the user
output: the choice made by user
menu : displays a menu and prompt to the user output : the choice made by user