Previous: 5.5 Common Errors
Up: 5 Numeric Data Types and Expression Evaluation
Next: 5.7 Exercises
Previous Page: 5.5 Common Errors
Next Page: 5.7 Exercises

5.6 Summary

In this chapter we have tied up some loose ends and formalized some of the concepts from previous chapters. We have seen how the finite number of bits available to represent numbers limits the range and precision of the numbers stored in the computer. We have introduced additional data types which can extend the range and increase precision as needed for some applications. We have discussed the data types void (when no value is expected) and enum (for improving program readability). We have also shown how user defined names for data types can be defined using typedef with syntax:

We have extended our available control constructs by introducing two variations on the looping constructs provided in the language: the for statement and the do...while statement, with syntax:

equivalent to

and

We have also described how expressions are evaluated, including the determination of the type of the result and the order of applying operators, giving the full precedence and associativity table for all C operators (Table 5.1). We have described some new operators, such as the increment/decrement operators:

composite assignment operators:
    <op>= <expression>
the conditional expression:
    ? <expr2> : <expr3>
the comma operator:
    , <expression2>
and the sizeof operator:
    <expression>
Other operators in the table such as the indirection, array subscripting, structure accessing, and bitwise operators will be described in later chapters.



Previous: 5.5 Common Errors
Up: 5 Numeric Data Types and Expression Evaluation
Next: 5.7 Exercises
Previous Page: 5.5 Common Errors
Next Page: 5.7 Exercises

tep@wiliki.eng.hawaii.edu
Wed Aug 17 08:40:40 HST 1994