There is a dynamic data structure in the PrintTabl function. I would make it so that the value of 3 fields of my structure is written in one line (first name, last name and middle name in 3 different variables)
void PrintTabl(LEL* p) { int len = 40;// Π΄Π»ΠΈΠ½Π½Π° ΡΡΡΠΎΠΊΠΈ + 1 ΡΠ»Π΅ΠΌΠ΅Π½Ρ ΠΏΡΠΈΠ·Π½Π°ΠΊΠ° ΠΊΠΎΠ½ΡΠ° ΡΡΡΠΎΠΊΠΈ char *str = (char*)malloc(len*sizeof(char)); strcat(str,p->inform.sname); strcat(str," "); strcat(str,p->inform.fname); strcat(str," "); strcat(str,p->inform.tname); strcat(str," "); printf("%-39s",str); printf("%-16s",p->inform.pnumber); printf("%-31s",p->inform.address); printf("%-11s",p->inform.family); printf("%-8s",p->inform.sallary); printf("\n"); free(str); printf("\n"); } After launching the program, we fill our queue with data when calling the PrintTabl function (and more specifically when the printf line is working ("% - 39s", str); 3 garbage characters are displayed (if you can call them that)) and after free (ptr) still stay 
strcat. It does 2 things: 1) Looks for the position of the end of the first line (i.e., the character0) 2) Starting from the found position, it adds the second line. And aftermallocyour first line is not really a string yet, i.e. the symbol0in it can be completely absent, andstrcatwhen searching for it, can go far beyond the allocated memory and eventually cause a memory corruption error when trying to add a second line to it. So, with three garbage symbols at the beginning of the line, you are still very lucky. - zed