MT1 Info
Overview and Proces
MUST BE TAKEN IN PERSON / NO REMOTE EXAMS
- Time/Date: Thurs. Feb. 23rd at 7 p.m. - 8:30 p.m. Pacific
- Location:
- MW 12:30 p.m.: THH 201
- MW 2:00 p.m.: THH 101 and 102
- 1.5x time OSAS Accommodations: THH 108
- 2x time OSAS Accommodations: Schedule with the OSAS testing center (we do not support proctoring for 2x time)
- Do not sit in the back row of each room as we need to be able to see your laptop screens for proctoring purposes.
- Accommodations: If you have USC approved accommodations, please expect an email from Ms. Tallulah Winston-Schrader 72 hours before the exam confirming where you will take the exam.
- Bring: A laptop or tablet with a minimum of 90 minutes battery run-time. Don’t count on outlet access.
- Format: The test will be taken on Gradescope by logging into our Blackboard section, choose Assignmentments..Midterm 1 and click on the Gradescope link which will redirect you to Gradescope. You will then find a MT1 assignment where you will be able to see the questions as a simple HTML form. All answers need to be entered or uploaded to Gradescope, but you may use scratch paper to work out a problem. The majority of questions will be analysis, tracing, and conceptual. But 2 problems will involve coding.
- You may NOT use Codio for any of the tracing problems; ONLY the coding problems.
- For the coding problems, you must write your code in Codio. You can then compile and run it if you like, but we are not expecting you to do that and we will visually grade your code to assign points. Don’t waste time trying to compile/debug your code until you have finished the other problems. We will provide a blank Codio assignment with the skeleton files for you to work on. You can find a link to that assignment in Blackboard..Assignments..Midterm 1 after the exam begins. While it might be useful to compile, we don’t recommend running and debugging unless you have time.
- Questions: Any questions about the content of the exam (clarification, etc.) should be asked on Piazza (and not by raising your hand) to avoid disrupting your neighbors.
- Policies:
- You are allowed 1 8.5x11 HANDWRITTEN (double-sided) cheatsheet with your USC email address and name written in the top-left corner of the cheatsheet on BOTH sides. What is printed on your cheatsheet MUST be handwritten (directly on the sheet or on a tablet and then printed) and MAY NOT contain prints of slides, copy/pasted code from homeworks/projects, etc. You can handwrite code from a past assignment, but just cannot copy/paste print. The reason is because by writing things, they will stick longer in your head and force you to recall what your code was doing, helping you learn.
- Other than the cheat sheet, the exam is Closed book, Closed notes, Closed Internet (search/reference). You may only access the following websites: Gradescope.com (to take the test), Codio.com (to edit/compile your code for coding problems Q6 and Q7), and Piazza.com for asking questions. Other than that your mind and scratch paper are the only resources allowed.
- No calculators, phones, or textbooks are allowed.
- You must request to use the restroom or leave the classroom for any reason and only 1 person will be allowed to leave at a time.
- You may not have headphones or earbuds in.
- Take care not to open the exam in 2 tabs / browsers or submit early. We can ONLY delete a submission if you click submit early and so you will need to start over again but will not be given additional time.
- If your laptop crashes, we will have a limited number of paper exams that you may use to finish the exam (but will not have the advantage of typing/editing code.)
- With 15 minutes remaining, no one will be allowed to leave the classroom (no bathroom use or leaving if you are finished). If you finish, simply close your laptop and sit quietly. Do NOT work on anything else.
- All answers and code must be submitted on Gradescope by 8:30 p.m. (not Codio) and anything after 8:30 will be consider a violation and may result in penalties!
Topics
The following is the list of topics that you should be familiar with. Use it as a guide to help your studying.
Unit 1a
- data types (int, char, double, bool)
- variables, scope
- experssions (including integer division, modulo, etc.)
- casting
- basic input/output with
cin
andcout
- basic math functions
pow
,sqrt
,sin
,cos
,abs
, etc. rand()
andsrand()
functions andRAND_MAX
constant
Unit 1b
- comparison operations
if
,else
,else if
statements- Not covered: switch (case) statement, ternary
? :
operator
- Not covered: switch (case) statement, ternary
while
anddo..while
loopsfor
loopsbreak
andcontinue
statements
Unit 1c
- defining arrays
- using arrays as look-up tables
- character arrays / C-strings
Unit 1d
- declaring, defining and calling functions
- return types and
void
functions - need for prototypes
- scope
- pass-by-value
- functions with array arguments (pass-by-reference)
Unit 2a
- big-O notation and using it to perform simple classification of code runtime
- Compilation using
g++
, its options/flags and how to compile code with multiple files - Understanding of the need for prototypes and the use of header (
.h
) files
Unit 2b
- Multidimensional arrays and linearization in memory
- Using multidimensional arrays for grayscale and color images
Unit 3a
- declaring pointer variables (
int *
) - referencing (
&
) and dereferencing (*
) - pointer arithmetic
- C strings (null-terminated character arrays)
- Built-in functions:
strlen
,strcpy
,strncpy
,strcmp
- Concept of dynamic memory allocation and when to use it
- Syntax of using
new
anddelete
both with scalars (individual variables) and arrays
Unit 3b
- pointers to pointers
- arrays of pointers (like char* argv[])
- command line arguments (
argc
andargv[]
) - Concept of shallow vs. deep copy
Practice
Here are some practice exams. Note that the topics they cover might be slightly different from our list of topics (below).
- Midterm Review Packet from Fall 2016-2018 [NO SOLUTIONS - Either run the code, crowdsource answers with fellow students, or come to office hours.]
- There are some duplicate questions that you can ignore.
- CS 103 Sp15 Midterm and Solutions
- This was a 60 minute exam
- Ignore the questions related to the
draw
library.
- CS 103 Fa14 Midterm and Solutions
- This was a 90 minute exam
- Additional midterm review questions with no solutions.