CSCI 103 Spring 2018: Introduction to Programming
Midterm Exam Information
When: Thurs. 2/22 7 p.m. - 8:30 p.m. (Please arrive 5-10 minutes early to get seated and setup.)
- MHP 101 - 9:30am section
- MHP B7B - 11:00am section last name A-M
- WPH B28 - 11:00am section last name N-Z
- SOS B2 - 2:00pm section
You will be allowed to bring a double-sided cheatsheet (8.5"x11") written in your handwriting or printed.
No calculators, computers, or textbooks are allowed.
Here are some practice exams. Note that the topics they cover might be slightly different from our list of topics (below).
- Midterm from Spring 2015 and its solutions.
- This was a 60 minute exam
- You can ignore the questions related to the draw library.
- Midterm from Fall 2014 and its solutions.
- This was a 90 minute exam
- Note, we won't be writing lots of code on paper, because there is a programming exam.
- An older practice midterm.
The following is the list of topics that you should be familiar with. Use it as a guide to help your studying.
- data types (int, char, double, boolean)
- variables, scope
- operators (+ - * / % == > < >= <= != && || !)
- assignment (=) and compound assignment (+= -= etc)
- basic input and output with cin and cout
- built-in functions: sqrt, pow, min, max, abs
- NOT included: C++ strings, advanced input/output (fail, setting width/precision)
- if, else
- Ternary operator: (cond) ? expression if true : expression if false
- Not covered: switch (case) statement
- for, while, do-while
- break, continue
- rand, srand, RAND_MAX
- declaring, defining and calling functions
- return, void
- pass-by-reference (by pointer)
- NOT included: recursion (5.8-5.10)
- defining arrays
- functions of arrays
- multi-dimensional arrays
- array linearization (aka array addressing)
- NOT included: vectors
- declaring pointer variables (*)
- referencing (&) and dereferencing (*)
- pointer arithmetic
- C strings (null-terminated character arrays)
- built-in functions: strlen, strcpy, strncpy, strcmp
- arrays of pointers
- command line arguments
- piping two programs together using
|at the command line
- File streams
- Opening and closing text files
- Reading and writing text files with >> and << operators
- Using getline()
- Chapter 8 (stream API, string streams)
- memorizing all the different Linux command-line programs from Lab 1