Q:

C, Structure writes only 4 characters

im stuck in writing my code with a problem I cant just deal with. I have to write data from a txt file to structures. The code looks like this:
typedef struct uzytkownik_
{
    char *imie;
    char *nazwisko;
    char *oprogramowanie;
    char *ip;
    struct uzytkownik *next;
}uzytkownik;

Later in the code i have this:
    fgets(tekst,sizeof(tekst),plik);
    sscanf(tekst,"%s",&gl->wsk_u->imie);
    fgets(tekst,sizeof(tekst),plik);
    sscanf(tekst,"%s",&gl->wsk_u->nazwisko);
    fgets(tekst,sizeof(tekst),plik);
    sscanf(tekst,"%s",&gl->wsk_u->oprogramowanie);
    fgets(tekst,sizeof(tekst),plik);
    sscanf(tekst,"%s",&gl->wsk_u->ip);
    printf("%s\n",&gl->wsk_u->nazwisko);
    printf("%s\n",&gl->wsk_u->imie);
    printf("%s\n",&gl->wsk_u->oprogramowanie);
    printf("%s\n",&gl->wsk_u->ip);

I know I could use fscanf so it would be shorter, and it was so written but I thought that this was the source of my problem so I replaced it with fgets and sscanf. Works the same. The printf's are there to see what is the result. gl is the 'head' pointer to my list, wsk_u is another pointer to my uzytkownik structure. Now whats the problem? So for the given data:
Adam
Kowalski
Windows7
174.14.0.1

the result is:
KowaWind174.14.0.1
AdamKowaWind174.14.0.1
Wind174.14.0.1
174.14.0.1

So what it basicly does, it takes 4 characters from a text line and cuts the rest, and then it adds next lines from the text file (also cut to 4 characters beside the last word as you can see). It should look like this:
Kowalski
Adam
Windows7
174.14.0.1

Why does it work like this and where could be the source of my problem?
EDIT:
Code with memory allocations:
    gl->wsk_u=malloc(sizeof(uzytkownik));
    gl->wsk_u->next=NULL;

These two lines are just above the sscanf code.

A:

I can see some problems here:

Not allocated memory for strings
Wrong usage of sscanf
Wrong usage of printf

You have to allocate memory for string before you use it
gl->wsk_u->imie = malloc(size_of_your_expected_string);
//DO this for each member you use with sscanf functon

Wrong usage of sscanf is the root problem.
sscanf(tekst,"%s", &gl->wsk_u->imie);

should be
gl->wsk_u->imie = malloc(100); //FOr example 100 bytes.
//DO this malloc for all entries
sscanf(tekst,"%s", gl->wsk_u->imie);

Printing is wrong
printf("%s\n",&gl->wsk_u->imie); 

should be
printf("%s\n", gl->wsk_u->imie);

