Skip to content

Instantly share code, notes, and snippets.

View aCayF's full-sized avatar

Lice Pan aCayF

  • Hangzhou,China
  • 08:57 (UTC +08:00)
View GitHub Profile
@aCayF
aCayF / README.md
Created October 18, 2016 08:30
README

Exercise 5.1

What is a null statement? When might you use a null statement?

Exercise 5.2

What is a block? When might you might use a block?

Exercise 5.3

@aCayF
aCayF / README.md
Created October 18, 2016 07:23
ch04

Exercise 4.1

What is the value returned by 5 + 10 * 20/2?

Exercise 4.2

Using Table 4.12 (p. 166), parenthesize the following expressions to indicate the order in which the operands are grouped: (a) * vec.begin() (b) * vec.begin() + 1

@aCayF
aCayF / README.md
Last active October 18, 2016 06:56
ch02

Exercise 2.1

What are the differences between int, long, long long, and short? Between an unsigned and a signed type? Between a float and a double?

Exercise 2.2

To calculate a mortgage payment, what types would you use for the rate, principal, and payment? Explain why you selected each type.

Exercise 2.3

@aCayF
aCayF / README.md
Last active October 17, 2016 11:56
ch01

Exercise 1.1

Review the documentation for your compiler and determine what file naming convention it uses. Compile and run the main program from page 2.

Exercise 1.2

Change the program to return -1. A return value of -1 is often treated as an indicator that the program failed. Recompile and rerun your program to see how your system treats a failure indicator from main.

Exercise 1.3

@aCayF
aCayF / README.md
Last active October 17, 2016 11:57
ch03

Exercise 3.1

Rewrite the exercises from and with appropriate using declarations

Exercise 3.2

Write a program to read the standard input a line at a time. Modify your program to read a word at a time

Exercise 3.3