Funciones definidas por el usuario y listas enlazadas en C

Estoy un poco atascado en cómo hacer una función definida por el usuario que imprima la salida. También tengo que hacer una función definida por el usuario que sume los datos en cada nodo e imprima el total, pero no se suma correctamente y el formato también está un poco apagado.

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char printout();
int sum();
typedef struct node
{
    int number;
    struct node*next;
} node;

char printout()
{

};
int sum()
{
    int s,sum_all=0, node_sum=0;
    for(s=0;s=100;s++)
    {
        sum_all=node_sum+s;
        return printf("The sum of all nodes is %d.\n",sum_all);
    };

};
int main()
{
    srand (time(NULL));
    int i, total=0;
    struct node*head=malloc(sizeof(struct node));
    head->number = rand()%100;
    printf("Node #%d contains %d.\n", 0, head->number);

    struct node*here=head;

    for (i=1; i<100; i++)
    {
        here->next=malloc(sizeof(struct node));
        here->number=rand()%100;
        printf("Node #%d contains %d.\n", i, here->number);
    };
    total=sum(here->number);
    printf("%2.2d", total);
    return 0;
}

Respuestas a la pregunta(1)

Su respuesta a la pregunta