home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
tyc
/
list9_2.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-16
|
711b
|
30 lines
/* Demonstrates the relationship between addresses and */
/* elements of arrays of different data types. */
#include <stdio.h>
/* Declare three arrays and a counter variable. */
int i[10], x;
float f[10];
double d[10];
main()
{
/* Print the table heading */
printf("\t\tInteger\t\tFloat\t\tDouble");
printf("\n================================");
printf("======================");
/* Print the addresses of each array element. */
for (x = 0; x < 10; x++)
printf("\nElement %d:\t%d\t\t%d\t\t%d", x, &i[x],
&f[x], &d[x]);
printf("\n================================");
printf("======================");
}