while((c = ttgetc()) > ' ') if(i > 30) break; temp[--i] = '\0';