Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 817 Bytes

01 - FP Basic.md

File metadata and controls

36 lines (29 loc) · 817 Bytes

✨ FP Basic ✨

For the following function, determine if it is a:

  • Informed producer
  • Changer producer
  • Changer
  • Producer
  • Informed producer
int double(int x) {
    return x * 2;
}

It takes in an integer and returns the double of it.

What are the types and outcomes of the following expresssions?

  • 2 * (15 - 6)/6 + 4 - 1
  • -20 % 6 - 4 / 10 + 2
  • 10 % 3
  • 17 / 5
  • 17.0 / 5
  • !!!false
  • true || false && !false

What type are each of the following values?

  1. 5.0
  2. 10
  3. "b"
  4. 'b'
  5. b
  6. "Hello World"

A student has posted a large part of their assignment questions on a "Homework Help" forum, and has received a few completed works in return. Is it OK for you to do the same, and use the answers in your assignment?