-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
96 lines (67 loc) · 1.36 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass{cs161}
\courseno{CS 161}
\coursename{Computer Security}
\courseterm{Spring 2022}
\courseinstructor{Popa and Weaver}
\title{Final Exam}
\printanswerstrue
\answerletterstrue
\usepackage{lipsum}
\begin{document}
\begin{questions}
\titledquestion{EvanBot}
\lipsum[1]
\begin{parts}
\part[1]
\lipsum[1][1-2]
\begin{choices}[2]
\CorrectChoice EvanBot
\choice CodaBot
\choice PintoBot
\choice 61Bee
\end{choices}
\begin{subparts}
\subpart[2]
\lipsum[1][3-4]
\end{subparts}
\uplevel{\lipsum[1][5-6]}
\part[1]
\lipsum[1][7-8]
\begin{checkboxes}
\CorrectChoice EvanBot
\choice CodaBot
\CorrectChoice PintoBot
\choice 61Bee
\end{checkboxes}
\part[1]
\texttt{"\lipsum[1][9-10]"}
\begin{solutionorbox}[1in]
\lipsum[2]
\end{solutionorbox}
\end{parts}
\titledquestion{Some Code}
\lipsum[3]
\begin{lstlisting}[language=C]
#include <stdio.h>
#include <stdlib.h>
char name[32];
void echo(void) {
char echo_str[16];
printf("What do you want me to echo back?\n");
gets(echo_str);
printf("%s\n", echo_str);
}
int main(void) {
printf("What's your name?\n");
fread(name, 1, 32, stdin);
printf("Hi %s\n", name);
while (1) {
echo();
}
return 0;
}
\end{lstlisting}
\end{questions}
\pagebreak
Hello world 2!
\end{document}