10 - ICS103 Programming in C Lecture 10 Functions II 1 Outline Introducing Functions that return multiple results What is a Pointer variable Functions

10 - ICS103 Programming in C Lecture 10 Functions II 1...

This preview shows page 1 - 5 out of 13 pages.

1 ICS103 Programming in C Lecture 10: Functions II
Image of page 1
2 Outline Introducing Functions that return multiple results What is a Pointer variable?
Image of page 2
3 Introducing Functions that return multiple results So far, we know how to pass inputs into a function and how to use the return statement to send back at most one result from a function. However, there are many situations where we would like a function to return more than one result. Some Example are: Function to convert time in seconds into hours, minutes and seconds Function to find the quotient and remainder of a division Function to return maximum, minimum and average from a set of values In this lecture, we discuss how a function can return more than one result, which is archieved through output parameters, which are pointer variables . Thus, to be able to write functions that return multiple results, we first need to learn about pointer variables.
Image of page 3
4 What is a Pointer variable?
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 13 pages?

  • Spring '10
  • baleh
  • Pointer, Return statement, Void type

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture