Skip to Content
Learn C Programming
book

Learn C Programming

by Jeff Szuhay
June 2020
Beginner content levelBeginner
646 pages
14h 58m
English
Packt Publishing
Content preview from Learn C Programming
Creating Custom Data Types with typedef

As we saw in the last two chapters, C allows you to define your own types from enumerations (enums) and structures (structs). C also allows you to redefine types for convenience of naming and to provide clarity about how to use the redefined type. The redefined type becomes a synonym for the original type. Being able to create a synonym of one type from another is extremely useful to express the purpose of variables, not only through their names but also through their redefined types. The benefits of this mechanism are numerous.

The following topics will be covered in this chapter:

  • Creating custom named types from intrinsic types
  • Creating new synonyms from other custom named types
  • Simplifying the use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn C Programming - Second Edition

Learn C Programming - Second Edition

Jeff Szuhay
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie

Publisher Resources

ISBN: 9781789349917Supplemental Content