Midterm Exam 2
COP-3223H
Table of Contents
Exam format
| Type | Count |
|---|---|
| Multiple choice | 5 |
| Long answer | 5 |
| TOTAL | 10 |
There are 10 questions and no extra credit.
Exam Procedure
- You will need the do the following to have your exam counted
- Be in the exam room physically.
- Use UCF here to record your attendance, or notify the instructor if you come in late.
- Submit your exam on time before leaving the room
- Show your UCF ID to instructional staff
- Submit your exam questions, showing your UCF ID card and your notes
- Do not take the question sheet (if received)
- You may keep your notes
- Sit at least one seat apart from other students (only if possible)
- Have on your desk only the following:
- Notes
- Blank scratch paper
- The exam
- Having any other items, devices, information sources, materials, or any other assistance to you or others is prohibited and will results in no credit for the exam, this includes but is not limited to
- Cell phones or other electronic devices
- Mechanical devices
- Information sources
- Communication devics
- Any other information open or available on your laptop
- Anything else
- Follow the University and course policies, such as the golden rule and prohibitions on unauthorized assistance
- SAS students will take the exam at SAS and they will take attendance
- Raise your hand and a proctor will come to you
- Stop taking the test no later than the end of the class period
Content
loops
- semantics of while
- when does loop end?
- when is the condition check?
- contrast with do-while?
- implementing programs with while
- examples: exponent, guessing game, etc.
- boundary conditions and off-by-one errors
- fixing a program
- getting boundary conditions correct
- testing 0, 1, and many
- examples: animation
- won't expect you to memorize terminal control characters
- but should be aware of them
- i will comment them if they are there
- types of questions
- describe program behavior
- write programs with loops
- analyze loop behavior, including nested loops: how many times things are called
switch
- semantics of switch
- using switch to process user input
- awareness of "fall-through" gotcha (need break statement)
- (won't be testing code for switch statements and states) using switch for state transitions
- correct, analyze, and write programs with switch
arrays and for loops
- semantics of for
- boundary conditions
- 0, 1, and many
- inclusive/exclusive bounds
- how many times loops run
- when conditions are checked
- initializing and using arrays
- base-0 arrays
- boundary conditions, correct usage of arrays
- c gotcha, array of bounds accesses
- describing what an array contains
- multidimensional arrays
- examples
strings
- strings as character arrays
- use for loops and array operations to work on strings
- do string operations without using existing functions (like in homework)
state machines
- basic understanding (states, state transitions)
- simple state transition tables (like homework)
- won't ask example like the state project since you haven't done it yet