CSC209H1 Chapter 6: DISCOVER Useful C Features - Part 1 of 1

29 views3 pages
11 Feb 2019
School
Course
Professor

Document Summary

Defines a keyword that is replaced by a specified string. This does not create a new type in the sense that structs do: not creating a new, composite type with components that have their own names. It provides a new name for an existing type. We might not know how to use the type. We can pass in age_t when supposed to be a "shoe_size_t" Compiler will not complain about this since both have the type unsigned int. Thus, cannot rely on the complier to point out the error but has to read the typedefs. And this is why we have header files. Header files store declarations away from definitions, to assist with ease of reading -- and to allow compilers to do some basic checks. Typedef easier to read for structs: ( ) we can even omit the student here.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents