lec06

lec06 - Enum, Typedef, Structures and Unions CS 2022:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Enum, Typedef, Structures and Unions CS 2022: Introduction to C Instructor: Hussam Abu-Libdeh Cornell University (based on slides by Saikat Guha) Fall 2009, Lecture 6 Enum, Typedef, Structures and Unions CS 2022, Fall 2009, Lecture 6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Numerical Types I int : machine-dependent I Standard integers I defined in stdint.h ( #include <stdint.h> ) I int8 t : 8-bits signed I int16 t : 16-bits signed I int32 t : 32-bits signed I int64 t : 64-bits signed I uint8 t, uint32 t, . .. : unsigned I Floating point numbers I float : 32-bits I double : 64-bits Enum, Typedef, Structures and Unions CS 2022, Fall 2009, Lecture 6
Background image of page 2
Complex Types I Enumerations (user-defined weekday : sunday, monday, . .. ) I Structures (user-defined combinations of other types) I Unions (same data, multiple interpretations) I Function pointers I Arrays and Pointers of the above Enum, Typedef, Structures and Unions CS 2022, Fall 2009, Lecture 6
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Enumerations enum days {mon, tue, wed, thu, fri, sat, sun}; // Same as: // #define mon 0
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

lec06 - Enum, Typedef, Structures and Unions CS 2022:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online