contiguous array storage : Array Char « Data Type « C / ANSI-C






contiguous array storage

  
#include <stdio.h>

#define iDAYS 7

int main()
{
 int index, iarray[iDAYS];

 printf("sizeof(int) is %d\n\n", (int)sizeof(int));

 for(index = 0; index < iDAYS; index++)
   printf("&iarray[%d] = %X\n", index,
           &iarray[index]);

 return(0);
}
  
    
  








Related examples in the same category

1.Compute the total of a list of numbers
2.Tic-Tac-ToeTic-Tac-Toe
3.Output the address of char array
4.For loop a char array
5.A simple dictionaryA simple dictionary
6.For loop a char array using pointer
7.Char array: pointer and loop
8.Assign a value to an element inside a char array
9.Char array: assign value and loopChar array: assign value and loop
10.Loop and output a char array
11.how array addressing and pointer arithmetic are linkedhow array addressing and	pointer arithmetic are linked
12.Show how bitmapped graphics may be usedShow how bitmapped graphics may be used
13.the use of strings
14.verifying array initialization