e01 : Midterm exam - I
num | ready? | description | exam date |
---|---|---|---|
e01 | true | Midterm exam - I | Wed 04/22 11:00AM |
The midterm will be on Gradescope. It’s called “Midterm 1”—it’ll become available at 10:30am on April 22. It’s open book and open notes, and must be done individually.
The midterm will be a timed exam that you can take any time within a 24-hour period, starting at 10:30am on April 22. You’ll have 80 minutes to complete the exam after you start it (unless you’ve requested DSP accomodations, of course!)
Lawton will be available (via Zoom) from 11am–1pm on April 22 to answer any questions. See the office hours page for his Zoom link. TAs and/or Tutors will also be available during their office hours and on Piazza.
If you take the exam at a different time than the class time and ask a Piazza question about it, keep in mind that it may not be answered in time.
Table of Operator Precedence (you’ll need this on the exam)
Click here for the precedence table
Topics Covered
- Homework 1 to Homework 3
- Lab 0 to Lab 2
- Lectures up until the exam
Study Guide
- Write the skeleton of a simple C++ program - see the hello world example covered in lecture
- Write code that involves passing parameters to main
- Read and write to standard input, output with cin, cout - you should be able to write code that uses these concepts, identify the difference between cout, exit and return
-
Floating point arithmetic and integer arithmetic
-
While loops, for loops, do while loops (very important)
-
Number representation and base conversion
- Functions
- An understanding of how parameters are passed to functions, and how values are returned from a function
- Difference between function that prints to output and function that returns a value
- Function declaration, definition and call
- Writing functions similar to those in the labs
- The ability to use variables and basic data types in the type of programs covered in class:
- Identify invalid use of variables: For example using a variable in an expression or assignment before declaring it
- Different ways of initializing variables:
int x =10; int x(10); cin>>x;
- Difference between variable declaration and initialization.
- What is the default value given to uninitialized variables in C++ and why this can be a problem
- The ability to debug and write code that involves flow control structures taught in class and used in labs. Pay attention to syntax, and the ability to use each appropriately to solve problems similar to those provided in the labs
- If else statements, multiway if-else statements
- For, while and do-while loops, nested for loops (used in lab02)
- Identify the occurrence of infinite loops
- Write, evaluate and simulate the run-time behavior of C++ expressions
- Operator precedence (You don’t have to learn the precedence table, you should just know how to apply it to evaluate expressions)
- Assignment statements and assignment operator used within an expression
- Evaluate compound Boolean expressions
- What evaluates to true? What evaluates to false?
Instructions for the exam
- The exam will take place during normal class time.
- The exam will be open book and open notes. I don’t want to use any proctoring services, so go crazy! The one thing you cannot do is talk to other people during the exam—if you do that and I find out you’ll get a 0.
- Ask any questions you have via Zoom—see the office hours page for Lawton’s zoom link. Lawton will be available during the entire exam time to answer questions.
- There are no makeups for this exam
- We will provide you the table of operator precedence
Homework solutions
Past exams
You may also refer to all the past exams. Please note that some questions on these exams may refer to labs that you have not completed so far. You will only be asked questions related to the labs you have completed. The past exams should however provide some information on the expected difficulty and approximate format of the exam. Please note that there may be differences in content as well.
- Spring’18 - midterm 1
- Spring’18 Midterm 1 solutions
- Spring’17 - midterm 2
- Spring’17 Midterm 2 solutions
- Spring’17 - midterm 1
- Spring’17 Midterm 1 solutions
- Winter’17 - midterm 1
- Winter’17 Midterm 1 solutions
- Winter’17 - midterm 2 (Ignore questions in Part 3)
- Winter’17 Midterm 2 solutions
- Prior to W17