C Functions, Structures

Last time: UNIX processes, redirection

Prof. Brian D. Davison

Computer Science & Engineering, Lehigh University

Additional Credits

Announcements

Functions: What and Why

Any ideas?

Functions: What and Why

Just a few reasons...

Using Functions

Defining Functions

The #include loads a file that defines c library functions.

Parameters in C Functions

What is call-by-value? Show example prog8-10.c

Structures

Structures

  • Not always desirable as structs can be arbitrarily large and we know that C functions pass arguments by value!
  • C libraries use structs

    Recursive Functions

    Looking Ahead