#todo

  • [ ] TODO: 没写完

1.3

funny question

Optimize Problems

  1. Is a switch statment always more efficient than a sequence of if-else statements?

    • [ ] q1
      answer:
  2. How much overhead is incurred by a function call?

    • [ ] q2

    answer:

  3. Is a while loop more efficient than a for loop?

    • [ ] q3

    answer:

  4. Are pointer references more efficient than array indexes?

    • [ ] q4

    answer:

  5. Why does out loop run so much faster if we sum into a local variable instead of an argument that is passed by reference?

    • [ ] q5

    answer:

  6. How can a function run faster when we simply rearrange the parenthes in an arithmetic expression?

    • [ ] q6

    answer:

1.4

1.4.1

I/O Devices

Each I/O devices is connected to I/O bus by either a controller or an adapter.

Controller is chip set in the devices or on the system's motherboard.
Adapter is a card that plugs into a slot on the motherboard.

#chapter1/IO