typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

/*
 * Print a user profile.
 * For an example of the required output format, see the example output
 * linked from the handout.
 * Return:
 *   - 0 on success.
 *   - 1 if the user is NULL.
 */
int print_user(const User *user) {
    if (user == NULL) {
        printf("user dne\n");
        return 1;
    }

    // friends
    printf("Friends: \n");

    for (int i = 0; i < MAX_FRIENDS; i++) {

        if (user->friends[i] != NULL) {
            printf("%s\n", user->friends[i]->name);
        }
    }
    printf("------------------------------------------\n");
how to print out all non-NULL elements of friends[MAX_FRIENDS]