how to use asprintf or snprintf to store curr->name in dynamically allocated strings
/*
 * Print the usernames of all users in the list starting at curr.
 * Names should be printed to standard output, one per line.
 */
void list_users(const User *curr) { 
    printf("User List\n");
    while (curr != NULL) {
        printf("\t%s\n",curr->name);
        curr = curr->next;
    }
}