qc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
TWODIM.C
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
/* TWODIM.C: Demonstrate multidimensional arrays. */
 
#include <stdio.h>
 
main()
{
   int j, k;
   int i_array[2][3] = { { 176, 4069, 303 }, { 6, 55, 777 } };
 
   printf( "--- Values --------     --- Addresses -------\n\n" );
 
   for( j = 0; j < 2; j = j + 1 )
   {
      for( k = 0; k < 3; k = k + 1 )
      {
         printf( "i_array[%d][%d] = %d", j, k, i_array[j][k] );
         printf( "\t&i_array[%d][%d] = %u\n", j, k, &i_array[j][k] );
      }
      printf( "\n" );
   }
 
}