Chapter 5 Advanced Data Types

In Chapter 4, “Data Types,” we described the basic C data types and showed how to declare and use different kinds of variables. This chapter examines more advanced data topics, including the visibility and lifetime of variables and the conversion of values from one data type to another.

If you know QuickPascal or QuickBasic, some of these topics, such as visibility, should be familiar. For example, a variable declared within a function is visible (accessible) only in that function. One area in which C differs notably from QuickPascal is type conversion. The C language gives programmers the freedom to convert a value from one type to another type, whereas QuickPascal does not.