PS I synthesize here in my own words what King teaches, re-write all his example programs, character by character, solve all the C exercises he hands out, and if I do not understand something fully I use Bermudez' CP: AMA Study Guide to find clarification. I comment to what King teaches cursively. I do not copy-paste anything from the book!
CPaMA 1Ed - Page 025 to 025 - 4.97% Completion
CPaMA 1Ed - Page 025 to 025 - 4.97% Completion
/* Converts a Fahrenheit temperature to Celsius */
#include <stdio.h>
#define FREEZING_PT 32.0
#define SCALE_FACTOR (5.0 / 9.0)
main () {float fahrenheit, celsius;printf (
'"Enter Fahrenheit temperature: ");scanf ("%f", &fahrenheit);
celsius= (fahrenheit-FREEZING_PT) *SCALE_FACTOR;
printf ("Celsius equivalent: %.1f\n",, celsius);return 0;}
This program will work. spaces are only essential to separate words from one another where this can not be done by other symbols. But in itself space has no meaning in the eyes of the program. This means we can use it as often as we want to make our program as readable as possible, since this example is very hard to read. Syntax should work and be readable, the latter so that more than one dev can make good use, alter and add to the program optimally.