Study Guides (248,356)
CS 137 (4)
Midterm

# Midterm Review.docx

3 Pages
215 Views

School
Department
Computer Science
Course
CS 137
Professor
Andrew Morton
Semester
Fall

Description
Midterm Review Section 1: Simple Programs, Functions and Header Files 1. Write a program that prints Hello World 2. Write a function that takes in an int h and an int i and prints h x i = hi where hi is h multiplied by i 3. What is each of the following header files/library used for? a. stdio.h; b. math.h; c. assert.h 4. To do at home: Write a function that takes in 3 triangles side lengths from a right triangle and prints out the 3 angles. What libraries will you use? 5. To do at home: Re-do your quizzes and make your own quiz in a similar style and complete that one too Section 2: Working with Arrays 1. Given 3 arrays of the same size a,b, and c. Place the absolute value of a[i] - b[i] in c[i] where i = 0…n where n is the size of the arrays. 2. To do at home: Write a program that multiplies each element of an array by a given integer 3. To do at home: Go over A4 and all the array questions. Section 3: Algorithms You May Need To Know 1. GCD Algorithm 2. Bisection Algorithm 3. To do at Home: Horner's Method 4. To go over your assignment: Finding Primes Section 4: Tricky Stuff 1. Write a program that converts a binary number (given in array form) to base 10 2. To do
More Less

Related notes for CS 137
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.