Usa la fgets di cui ti rimando alla documentazione per approfondimenti.
codice:
   char t[8];
   fgets(t,8,stdin);