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, putting the first part in Cstring a and the remaining part
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
local integer variable. After the execution of which of t
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. Define your own version of the strcat function that wor
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 functions work correctly
Collaboration policy:
For this lab
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
Distance class
Distance represents a length, consisting of
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 "bubble sheet", plus one or two sheets
of blank scratch pa
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", plus one or two sheets
of blank scratch paper; use a blu
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 < a[i] < ' ';
a. 4 3 2 2 2
b. 4 3 2 ? ?
c. 4 3 2 0 0
d.
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 another student's solution or partial
solution to this ass
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 the C+ floating-point types (float,
double), fail to c
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 with the cloud9 editor.
Know how to compile your code us
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 even look at another student's solution or partial soluti
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 Expense
Interest Expense
Income Tax Expense
Total Expenses
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 Expense
Income Tax Expense
Total Expenses
Net Income
36,100
2
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 bubble sheet
bubble in your Student ID, your section number
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 the bubble sheet
bubble in your Student ID, your secti
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. 2
Assets
(a)
Cash
Supplies
+40,000
(b)
13,000
Land
Bu
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 m, n, and p are integers, then m + p is even.
What kind
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 your school has lived in Vietnam.
(b) There is a student
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
Office: 3102 Sproul Hall
Email: [email protected]
Office P
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 black flies in Maine.
(c) 2n 100.
(2) What is the negatio
/DE'LVWDQFHFODVV
*RDOV
'LVWDQFHFODVV
feet
inches
7KH&ODVV6SHFLILFDWLRQ
Distance(unsignedft,doublein)
ft
in
feet
in
inches
Distance(doublein)
feet
init()
in
inches
amemberfunctionconvertToInches()thatreturnsthedistanceinall
inchesdoesnotchangethestateofthe
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 % is used to compute _.
a.
b.
c.
d.
integer division
f
Computer Vision
Spring 2006 15-385,-685
Instructor: S. Narasimhan
Wean 5403
T-R 3:00pm 4:20pm
Lecture #19
Principal Components Analysis
Lecture #19
Data Presentation
Example: 53 Blood and
urine measurements (wet
chemistry) from 65
people (33 alcoholics,
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 IDE: Integrated
Programming Environment. In our case, tha