home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc / qc25 / parray.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-15  |  294 b   |  17 lines

  1. /* PARRAY.C: Demonstrate pointer to array. */
  2. #include <stdio.h>
  3.  
  4. int i_array[] = { 25, 300, 2, 12 };
  5.  
  6. main()
  7. {
  8.    int *ptr;
  9.    int count;
  10.    ptr = &i_array[0];
  11.    for( count = 0; count < 4 ; count++ )
  12.    {
  13.       printf( "i_array[%d] = %d\n", count, *ptr );
  14.       ptr++;
  15.    }
  16. }
  17.