CS 012
Sample Midterm Questions Coding
Summer - 2015
1. Write a function named split that passes in 3 Cstrings and a character. The split function should
split the first Cstring (s) into 2 parts, putt
Name_ Login_
CS 012 Practice Questions
Only bubble in one best answer per question.
Winter - 2016
1. Suppose that p1 and p2 are both pointers to the same dynamically-allocated integer value; y is a
lo
Lab 2 Specifications
Goals
By the end of this lab you should:
be more familiar with arrays
be more familiar with c-style strings
be more familiar cstring library functions
strcat implementation
1.
Lab 7 - IntVector intro
Goals
By the end of this lab you should:
have a good head start on the IntVector assignment
have fully tested the constructors and accessor functions
be confident these func
Assignment3:Dateclass
CollaborationPolicy
Youmaynotusecodefromanysource(anotherstudent,abook,online,etc.)withinyour
solutiontothisassignment.Infact,youmaynotevenlookatanotherstudent'ssolutionor
partia
Lab 5 - Distance class
Goals
By the end of this lab you should:
be more familiar with declaring and using your own ADT (class).
know how to declare and implement an overloaded operator function
Dist
Name_ILearn username_ Lab Section _
CS 012(v) Intro to Computer Science II
Mid-term exam Wednesday 8/12
Summer - 2015
Total 88 points
Time: 90 mins.
You may have on your desks ONLY this exam, your "bu
Name_ RSub username _
CS 012(v) Intro to Computer Science II
Mid-term exam Wednesday 8/12
Summer - 2015
Total 88 points
Time: 90 mins.
You may have on your desks ONLY this exam, your "bubble sheet", p
CS 012
Sample Midterm Questions M.C.
Summer - 2015
1. What is output by the following code block?
(? represents garbage or unknown values)
int a[5] = cfw_4,3,2;
for (int i = 0; i < 5; +i) cfw_
cout <
Assignment 5: IntVector
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your
solution to this assignment. In fact, you may not even look at ano
Lab 4 - Rational class
Goals
By the end of this lab you should:
be more familiar with declaring and using your own ADT (class).
Rational class
Rational Numbers
It may come as a bit of a surprise when
Lab 1 Specifications
Points
Number Guessing Game (3 points)
PI Estimation (3 points)
Vector search & remove (4 points)
Goals
By the end of this lab you should (if you weren't already):
Be familiar wi
Assignment 4: Bulletin Board
(Part 1)
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your solution to this
assignment. In fact, you may not ev
CP1-3
Req. 1
LIFE TIME FITNESS, INC.
Income Statement
For the Nine Months Ended September 30, 2013
(in thousands)
Service Revenue
$ 914,900
Expenses
Operating Expenses
Office Expenses
Advertising Expe
Homework 3 Solution
CP44
Req. 1
GOLF ACADEMY, INC.
Unadjusted Income Statement
For the Year Ended December 31, 2015
Service Revenue
$ 51,500
Salaries and Wages Expense
Supplies Expense
Interest Expens
Name: _
username (UCR NetID): _
CS 012 Intro to Computer Science II
Mid-term exam Monday 5/2
Spring - 2016
total 40 points
DO NOW:
write in your name & username (UCR netID) both here and on the bubbl
Name: _
username (UCR NetID): _
CS 012 Intro to Computer Science II
Mid-term exam Tuesday 11/1
solution
Fall - 2016
total 40 points
DO NOW:
write in your name & username (UCR netID) both here and on
Homework Solution 2
CP2-1
Req. 1
Ag BioTech was organized as a corporation. Only a corporation issues shares of stock to its owners in exchange for their
investment, as ABT did in transaction (a).
Req
Homework #3
Due Monday, July 17
1. Logic
1.7. Introduction to Proofs.
1. Use a direct proof to show that the sum of two odd integers is even.
2. Prove that if m + n and n + p are even integers, where
Homework #2
Due Monday, July 10
1. Logic
1.4. Predicates and Quantifiers.
1. Translate each of these statements into logical expressions in two different ways by varying the
domain.
(a) A student in y
Econ 003-001 Principles of Microeconomics (5 Credit Hours)
University of California, Riverside
Spring 2017
Meeting Time: Monday, Wednesday and Friday, 2:10 3:00 pm, UNLH 1000
Instructor: Bree Lang
Off
Homework #1
Due Monday, July 3
1. Logic
1.1. Propositional Logic.
(1) Which of these are propositions? What are the truth values of those that are propositions?
(a) Do not pass go.
(b) There are no bl
/DE'LVWDQFHFODVV
*RDOV
'LVWDQFHFODVV
feet
inches
7KH&ODVV6SHFLILFDWLRQ
Distance(unsignedft,doublein)
ft
in
feet
in
inches
Distance(doublein)
feet
init()
in
inches
amemberfunctionconvertToInches()thatr
Name_ Username_
CS 012 Intro to Computer Science II
Review Quiz
Spring - 2017
Each multiple-choice question is worth 1 point.
Only bubble in one best answer per question.
1. In C+, the binary operator
Setting up your programming environment
This is a programming course, and the tool you will be spending most of your time immersed in your home away from home for the next few weeks! - will be your ID