I am using latex exam class for short questions which provide lines for answers. The following code codes gives me lines for answers which span the full width of the page. I want to control the width of these lines so that I can reduce them according to my choice (1 inch, 2in etc.)
\begin{document}
\begin{questions}
\question What is your name? \fillwithlines{3cm}
\end{questions}
\end{document}
As an example, this is what I get with the existing code:
Whereas I want something the following:
I would appreciate for any help in this regard. Thanks