int create_user(const char *name, User **user_ptr_add) {
    if (strlen(name)>= MAX_NAME){
        return 2;
    }

    //Initializing a new user with name "name" and .next set to NULL to be added 

    User *new_user;
    new_user = malloc(sizeof(struct user));
    strncpy(new_user->name, name, MAX_NAME);
    new_user->first_post = NULL;
    // new_user->profile_pic = NULL;

    new_user->friends = (User*)calloc(MAX_FRIENDS, sizeof(User));
    // User *friends[MAX_FRIENDS];
    // new_user->friends = friends;

    // if (friends == NULL) {
    //     return 2;
    // }
    //  = friends;
    new_user->next = NULL;


    if (user_ptr_add != NULL){
        User *curr_user = *user_ptr_add;
        while (curr_user->next!= NULL){
            if (strcmp(curr_user->name, name)==0){
                return 1;
            }
            curr_user = curr_user->next;
        }
        if (strcmp(curr_user->name, name)==0){
                    return 1;}
        curr_user->next = new_user;
        return 0;

    }else{
        // struct user *new_user;
        // printf("New user initialized\n");
        // new_user = malloc(sizeof(struct user));
        // printf("malloc\n");
        // strncpy(new_user->name, name, MAX_NAME);
        // printf("name set\n");
        // new_user->first_post = NULL;
        // printf("1st post done\n");
        // // new_user->profile_pic = NULL;
        // // new_user->friends = NULL;
        // new_user->next = NULL;
        // printf("set next to nill\n");
        *user_ptr_add = new_user;
        return 0;
    }
    
}
* Create a new user with the given name.  Insert it at the tail of the list
 * of users whose head is pointed to by *user_ptr_add.
 *
 * Return:
 *   - 0 if successful
 *   - 1 if a user by this name already exists in this list
 *   - 2 if the given name cannot fit in the 'name' array
 *       (don't forget about the null terminator)