<!-- hamlet
<!-- copytar
examples/                                                                                           0040755 0002611 0000666 00000000000 06355553601 0013536 5                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        examples/aptr1.c                                                                                    0100644 0002611 0000666 00000000530 06355553573 0014734 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 4 */
/* Helps illustrate that arrays are pointers

Created:  Joe Zachary, November 14, 1992
Modified:
*/

#include <stdio.h>


/* This function receives an integer by reference and initializes
   it to 17. */

void init (int *n) {
  *n = 17;
}


void main () {
  int y; int *x = &y;
  init(x);
  printf("The value is now %d\n", *x);
}
                                                                                                                                                                        examples/aptr2.c                                                                                    0100644 0002611 0000666 00000000543 06355553577 0014745 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 4 */
/* Helps illustrate that arrays are pointers

Created:  Joe Zachary, November 14, 1992
Modified:
*/

#include <stdio.h>


/* This function receives an array as an argument
   and initializes its first argument to 17. */

void init (int n[]) {
  n[0] = 17;
}


void main () {
  int x[1];
  init(x);
  printf("The value is now %d\n", x[0]);
}
                                                                                                                                                             examples/aptr3.c                                                                                    0100644 0002611 0000666 00000000604 06355553577 0014744 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 4 */
/* Helps illustrate that arrays are pointers

Created:  Joe Zachary, November 14, 1992
Modified:
*/

#include <stdio.h>


/* This function returns the sum of the five elements
   of the array argument. */

int sum (int A[]) {
  return(A[0] + A[1] + A[2] + A[3] + A[4]);
}


void main () {
  int X[5] = {1, 2, 3, 4, 5};
  printf("The sum of the elements is %d\n", sum(X));
}
                                                                                                                            examples/aptr4.c                                                                                    0100644 0002611 0000666 00000000611 06355553577 0014743 0                                                                                                    ustar 00hamlet                          hamlet                          0000235 0000202                                                                                                                                                                        /* level 4 */
/* Helps illustrate that arrays are pointers

Created:  Joe Zachary, November 14, 1992
Modified:
*/

#include <stdio.h>


/* This function returns the sum of the five elements
   of the array argument. */

int sum (int *A) {
  return(*A + *(A+1) + *(A+2) + *(A+3) + *(A+4));
}


void main () {
  int X[5] = {1, 2, 3, 4, 5};
  printf("The sum of the elements is %d\n", sum(X));
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       