10 - ICS 103: Computer Programming in C Handout-10 Topic:...

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

View Full Document Right Arrow Icon
ICS 103: Computer Programming in C Handout-10 Topic: Function Output Parameters Implemented with Pointers ( OR Function with Output Parameter) . Objective: To know how a function can return more values using output parameters. To know some basic concept about pointers. To study some examples on above concepts. Functions with output parameters using pointers: Till now we used only the functions that returned zero or one value through the  return statement. To return more  than one value, we need to use the output parameters , which are  pointers. Note that when we use output  parameters in functions we declare those functions as  void returning functions because they are not returning any  value by return statement. Basic Concept about Use of Pointers: What is Pointer  ?  :  A pointer variable is a special variable, which stores the address of other variable. If a pointer variable stores the  address of a char variable, we call it a character pointer and so on.                                    Normally a variable directly contains a specific value. A pointer, on the other hand, contains an address of a  variable that contains a specific value.  Pointers like any other variables must be declared before they can be used.     *  :  Pointer operator OR Indirection operator OR Value at address.    Examples: int *j -------- à  Means the value at address contained in  j is an int OR in other words j is an integer pointer. Printing Pointers:
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

10 - ICS 103: Computer Programming in C Handout-10 Topic:...

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

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