100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSCI-2041: Advanced Programming Principles 2024 – 2025 CSCI-2041 Midterm 1 Exam Review Questions with Verified Solutions | 100% Pass Guaranteed | Graded A+ | $14.99   Add to cart

Exam (elaborations)

CSCI-2041: Advanced Programming Principles 2024 – 2025 CSCI-2041 Midterm 1 Exam Review Questions with Verified Solutions | 100% Pass Guaranteed | Graded A+ |

 3 views  0 purchase

CSCI-2041: Advanced Programming Principles 2024 – 2025 CSCI-2041 Midterm 1 Exam Review Questions with Verified Solutions | 100% Pass Guaranteed | Graded A+ |

Preview 2 out of 8  pages

  • October 19, 2024
  • 8
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (6)
avatar-seller
YourAssignmentHandlers01
CSCI-2041: Advanced Programming
Principles 2024 – 2025 CSCI-2041
Midterm 1 Exam Review Questions
with Verified Solutions | 100% Pass
Guaranteed | Graded A+ |




Administrator
[COMPANY NAME] [Company address]

, # Midterm 1 Practice Questions

*CSci 2041: Advanced Programming Principles, Fall 2015*

These are some examples of questions similar to those that will
appear on the first midterm.

##1. Types and values

For each of the following expressions, indicate whether the expression
is correct and give its type, or will cause a type error when compiled
with no preceding bindings. If the expression is correct, explain why
you derived the type, and if it will cause a type error, explain the
nature of the type error.


```
let x = 5 in
let z y = x+y in z
```

```
let rec funny = fun x -> funny (x+1)
```

```
let z = (4,6) in
let (a,_) = z in (string_of_int z) ^ "!"
```

```
function
| [] -> []
| x::xs -> Some x
```

```
function
| (_,0) -> 1
| (s,n) -> n * (String.length s)
```

```
let d = 0.5 in
let (e,f) = (1, 2.4) in (d+e) *. f
```

```
let (@@) f x = (f x)
```

```
let rec my x l = match (x,l) with
| (0,_) | (_,[]) -> []
| (_, h::t) -> my (x-1) t
```

```
let rec tr ky = function
| [] -> ky
| h::t -> tr h^ky t
```

```




https://www.coursehero.com/file/13271012/midterm1-practicemd/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller YourAssignmentHandlers01. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

80630 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.99
  • (0)
  Add to cart