Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: de2055ad24
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.609 kB
\begin{Exercise}[title={Cat},difficulty=1]
\label{ex:cat}
\Question \label{ex:cat q1} Write a program which mimics the Unix program
\prog{cat}. For those who don't know this program, the following
invocation displays the contents of the file \dir{blah}:
\begin{display}
\pr cat blah
\end{display}
\Question Make it support the \-n flag, where each line is
numbered.
\end{Exercise}
\begin{Answer}
\Question The following is implemention of \prog{cat} which also
supports a \-n flag to number each line.
\lstinputlisting[label=src:cat,caption=A cat program]{ex-beyond/src/cat.go}
\showremarks
\end{Answer}
Jump to Line
Something went wrong with that request. Please try again.