l'operatore è != non =!
così stai assegnando a stringa[p] la negazione del carattere '\0'