FINAL 1.0 version with NO MEMORY ERRORS but with some errors with char* p = (char*)malloc(sizeof(!!!CHAR!!!(with char* there arent any errors)) in VALGRIND and with COMMENTS