Miscellaneous C Topics

Last time: Finish Pointers

Prof. Brian D. Davison

Computer Science & Engineering, Lehigh University

Additional Credits

Announcements

Exam #1 Topics

Finish Friday's discussion

Functions that return pointers

Generally, either you need to free() or this is memory that you have no control over...

Stack/Heap

Why can't malloc'd data be on the stack?

User-Defined Structures

Access to Structs

User-defined types

Typedef

The comma operator

Large Program Development

Multiple Source Files

Sharing State

Try it!

Not Sharing State

Try it!