printf("Value of y: %g\n", y);
printf("Value of z: %g\n", z);
When compiled using GCC and then executed, this program produced the
Value of i: 5618848
Value of j: 0
Value of k: 6844404
Value of x: 3.98979e-34
Value of y: 9.59105e-39
Value of z: 9.59105e-39
The values printed depend on many factors, so the chance that you'll get
exactly these numbers is small.
[was #10] (a) is not legal because 100_bottles begins with a digit.
As the example demonstrates, it can be difficult to determine the exact
number of adjacent underscores in an identifier.
(a) Yes (b) No (if is a keyword) (c) No (d) No (e) Yes
[was #12] There are 14 tokens: a, =, (, 3, *, q, -, p, *, p, ), /, 3,
answer = (3 * q - p * p) / 3;
Apart from the #include preprocessing directive, which needs to be on
its own line, only three spaces are essential: one between int and main,
one between int and height, and one between return and 0.
Answers to Exercises (Chapter 3)
In the answers below, • represents a space:
(a) ••••86,1040 (b) •3.02530e+01 (c) 83.1620 (d) 1e-06•
(a) printf("%-8.1e", x);
(b) printf("%10.6e", x);
(c) printf("%-8.3f", x);
(d) printf("%6.0f", x);
(a) Equivalent (b) Not equivalent; the string on the right will skip any