Skip to Main Content
Learn to Program with C
book

Learn to Program with C

by Noel Kalicharan
December 2015
Beginner content levelBeginner
336 pages
7h 4m
English
Apress
Content preview from Learn to Program with C

CHAPTER 10

image

Structures

In this chapter, we will explain the following:

  • What a structure is
  • How to declare a structure
  • How to use typedef to work with structures more conveniently
  • How to work with an array of structures
  • How to search an array of structures
  • How to sort an array of structures
  • How to declare nested structures
  • How to use structures to manipulate fractions
  • How to use structures to store parallel arrays
  • How structures can be passed to a function

10.1 The Need for Structures

In C, a structure is a collection of one or more variables, possibly of different types, grouped together under a single name for convenient handling.

There are ...

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

Sudoku Programming with C

Sudoku Programming with C

Giulio Zambon
Learning C for Arduino

Learning C for Arduino

Syed Omar Faruk Towaha

Publisher Resources

ISBN: 9781484213711Purchase book