> For the complete documentation index, see [llms.txt](https://wenbo-notes.gitbook.io/cs1010-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wenbo-notes.gitbook.io/cs1010-notes/past-year-exam/midterm-paper/midterm-ay21-22.md).

# Midterm (AY21/22)

## Problems

### 4. Data Type Conversion

There is only one point to note down in this problem, that is **when you assign a** `double` **to a** `long` **,the numbers after the floating point will be trauncated.**

For example,

```c
long x = 2.00 - 1.00; // x will be 1
```

### 7. Assertion

One tip is that when doing questions about **assertion or loop variant**, check all the options since there are likely to have some **trivial one**!!!

### 8. Logical Expression\*

A good question that tests your **Truth Table Method**, good to try again!

### 12. Recursion\*

Another awesome question worth trying again to test the recursion thinking.
