Exam Date: Monday, March 15, 2021
Page 1 of 5
CSE-278: Introduction to Systems Programming (Systems 1)
Midterm Study Guide
Monday, March 15th 2021 @ 8:00 PM
via Canvas using Proctorio
Text Coverage:
1. "C++ How to Program" by Paul Deitel and Harvey Deitel. Prentice Hall. See Canvas
"Syllabus page" for links to text.
▪ Chapter 1 (Introduction)
▪ Chapter 2 (Expressions & I/O)
▪ Chapter 3.1, 3.2 (String & methods)
▪ Chapter 4 (if statements)
▪ Chapter 5.1 – 5.10 (loops & switch)
▪ Chapter 6 (functions/methods)
▪ Chapter 7.10 (std::vector)
▪ Chapter 14.1 – 14.6 (File I/O)
▪ Chapter 15.6.4: Associative Containers (std::unordered_map)
Types of Questions to expect:
Combination of multiple-choice, fill-in-the-blanks, short answer, “what does the following code
do”, and “write the C++ code to do the following" questions. You will need to be able to read and
write C++ code. You will be asked to write various C++ programs similar to those in lecture notes,
exercises, and homework assignments.
Approximate point breakdown:
30% multiple choice or fill-in-the-blank
30% short answer
30% programming
10% code analysis
Resources during the exam:
You will be allowed to use your own notes that you have written down on paper (e.g., you can
create your own reference sheet), but you are NOT ALLOWED TO USE THE INTERNET (this
includes the internet on your phone) and you should NOT be discussing/sharing any solutions
with other students during the exam.
Exam Date: Monday, March 15, 2021
Page 2 of 5
Concepts you should know:
• Generic Concepts:
o Fundamentals of problem solving
o Source code, pseudo code, algorithm
o Syntax errors and troubleshooting them
o Semantic errors and troubleshooting them
o Functional testing
o 4 key principles of object-oriented programming (Slides: 31)
o Concept of data types and information that can be inferred from data types (Slides:
08)
o Basics of files: path, absolute vs. relative path, directory vs. file. Executable vs.
source file. (Slides: 01-04)
• Networking systems
a. Basic concepts of packet switched networking (Slides: 24)
i. Terminology and acronyms
b. Domain Name Systems (DNS) (Slides: 24)
i. Mapping host names to IP addresses
ii. Using dig to recursively query name servers to resolve host names
c. Networking models & associated concepts (Slides: 24-26)
i. Layer 1 (Physical layer) (Slides: 24)
▪ Concept of wired/wireless
ii. Layer 2 (Link layer) (Slides: 24)
▪ NIC
▪ MAC
▪ MAC address
iii. Layer 3 (Network layer) (Slides: 24 and 25)
▪ IP address
▪ Internet Protocol
a. Packet structure
b. Basics of routing.
▪ ICMP
a. Ping and measuring Round Trip Time (RTT)
iv. Layer 4 (Transport layer) (Slides: 24 and 26)
▪ UDP vs TCP
▪ TCP handshake
v. Layer 5 (Application Layer) (Slides: 24 and 27)
▪ Concept of a protocol
▪ Important applications, protocols, and port numbers
▪ Basics of HTTP protocol
a. Using telnet to perform a GET request based on a given
URL
b. Request vs. response headers
c. Basic content types in HTTP response
Exam Date: Monday, March 15, 2021
Page 3 of 5
• C++ programming:
a. Basic program constructs
i. Variables & expressions (Slides: 08)
ii. Constant variables vs. literal constants (Slides: 08)
iii. Signed vs. unsigned data types (Slides: 08)
iv. if and if-else statements (Slides: 10)
v. Looping constructs (for, while, do-while, range-for) (Slides: 11)
vi. Basic mathematical problem solving concepts
▪ Deciding number is even/odd, positive/negative,
factor/divisor/dividend/quotient
▪ Using division and modulo operations for basic number manipulation,
e.g.: reverse a number with loops & math (without using string)
▪ Detecting if a number is prime.
▪ Identifying largest/smallest number in a set of inputs
▪ Finding average (i.e., mean) of a given set of numbers
vii. Functions/methods (Slides: 14-16)
▪ Pass by value versus pass by reference
a. Preferred approach for primitive data types vs. objects
▪ Memory impact of pass-by-value
▪ Using const keyword for parameters.
viii. Default values for parameters (Slides: 32-33)
b. Basics of objects
i. Differences between primitive and object data types in C++
ii. Calling methods on objects (e.g.: string::length)
iii. Using std::string (Slides: 08)
▪ Constructors for string.
▪ String comparisons
▪ Methods for operating and accessing strings
▪ Conversion to-and-from numeric data types and std::string.
(Slides: 08, 17)
c. Arrays (Lecture 19)
i. Basics of old-style arrays.
ii. 1-D arrays
iii. 2-D arrays
iv. Command-line arguments (Slides: 18)
▪ Designing programs that use command-line arguments
▪ Figuring out what and how many command-line arguments a
program ought to take.
Exam Date: Monday, March 15, 2021
Page 4 of 5
d. Vectors (Slides: 21)
i. Use of vectors instead of arrays for processing data
ii. Differences between vectors and arrays
iii. Defining and using vectors of different data types
iv. Using vectors in method definitions and method calls
v. Create type aliases via the using clause in C++ (Slides: 23)
▪ Creating aliases given English description
▪ Tracing aliases back to their original types.
vi. Operations on a vector: adding elements, accessing elements, removing
elements, etc.
vii. Reading/printing/writing vectors to I/O streams
e. Hash maps (unordered_map) (Slides: 22)
i. Use of unordered_map
ii. Using unordered_map as associative arrays
iii. Defining and using unordered_maps of different data types
iv. Looking-up values in unordered_maps
v. Iterating over all the entries in a map and processing them
vi. Reading/printing/writing vectors to I/O streams
f. Basic text file I/O operations
i. Reading and writing data to console using std::cin and
std::cout. (Slides: 09)
ii. Using stream-insertion (<<) and stream-extraction (>>) operators to read
and write data. (Slides: 09)
▪ Understanding these operators and how they handle whitespaces.
iii. Using std::getline method to read a full line of text (Lecture 09)
iv. Using std::ifstream and std::ofstream to read/write text
files. (Slides: 19)
v. Using std::istringstream and std::ostringstream to
perform I/O with strings. (Slides: 20)
g. Other exercises (Lab and Homework Assignments)
i. Converting English statements to corresponding C++ statements
ii. Describing C++ statements in English
iii. Code walkthroughs to determine operation and output from a C++
program
iv. Developing a C++ program given a functional description
• Basic Linux Commands: basic operations on Linux, changing directory, creating
programs, compiling and executing programs, observing processes, listing files, redirection
of I/O at the shell, secure copying files, etc. (Slides: 01-04)
Exam Date: Monday, March 15, 2021
Page 5 of 5
Preparation Suggestions:
1. As a general note you should expect to repeat questions from lab exercises and
homework.
2. You should know all the material in lecture slides.
3. Do read the E-book materials used in homework while paying attention to
implementation/application details.
4. Redo lab exercises. Develop short programs to test/verify your understanding of
concepts. Review vectors and how to use vectors. Review unordered_map and how to
use it.
5. Review homework solutions on Canvas.
学霸联盟