A Variation on the answer at Create fill-in-the-blank version of a document with ability to toggle blanks on and off
It provides \answer for continuous underline (with line breaks) and \answerwords for word-by-word underline. Uncomment \TeacherCopy in the preamble, and get the teacher version.
EDIT, per Manuel's request, I leave extra space for the student's answer, which I accomplish by setting the fontsize to \Huge prior to commencing the underlining blackout, and then resetting it afterward (note that this does not affect the vertical height allocated for the answer, since the Huge text is converted into a vertically-challenged rule of the same width).
REEDITED so that teacher version provides same word spacing as student version.
The \censorruleheight and \censorruledepth can be altered to change the elevation the rule thickness and placement, respectively.
\documentclass{article}
\usepackage{censor}
\usepackage{xcolor}
\usepackage{readarray}
\usepackage{ifthen}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\newcounter{index}
\def\mysize{\Huge}
\def\answer#1{\mysize\xblackout{#1}\normalsize}
\def\answerwords#1{\mysize\blackout{#1}\normalsize}
\def\TeacherCopy{%
\def\answer##1{%
\color{red}%
\getargsC{##1}%
\setcounter{index}{0}%
\whiledo{\theindex<\narg}{%
\stepcounter{index}%
\setbox0=\hbox{\mysize\csname arg\romannumeral\theindex\endcsname}%
\underline{$\vphantom{g}$%
\makebox[\wd0]{\csname arg\romannumeral\theindex\endcsname}}%
\mysize\ \normalsize%
}%
\unskip%
\color{black}%
}%
\let\answerwords\answer%
}
%\TeacherCopy
\parindent0pt
\begin{document}
\begin{enumerate}
\item And the answer to life, the universe, and everything, is \answer{forty two}.
\item The beginning six words of the Gettysburg Address are
\answerwords{Four score and seven years ago}.
\end{enumerate}
\end{document}
Student copy:

Teacher copy:

\hrulefillto represent the missing word(s)? What about breaks over lines? – Werner Mar 13 '14 at 03:24examdocument class. – Sean Allred Mar 13 '14 at 06:37