#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>

int main(void)
{
	//One-dimensional arrays
	
	//Initialize and set values all at once
	double a[3] = {0.25, 0.30, 0.35};
	int b[15] = {1};	
	float c[] = {3.2, 5.5, 6.2};	//size of array is set by number of elements contained
	double d[10] = {0.0};
	
	//How many elements are in each array?
	int double_size = sizeof(double);
	int int_size = sizeof(int);
	int float_size = sizeof(float);
	printf("\nSize of a double = %i bytes", double_size);
	printf("\nSize of a int = %i bytes", int_size);
	printf("\nSize of a float = %i bytes\n", float_size);

	printf("\nSize of array a = %i bytes\n", sizeof(a));
	printf("\nSize of array b = %i bytes\n", sizeof(b));
	printf("\nSize of array c = %i bytes\n", sizeof(c));

	printf("\nNumber of elements in a = %i\n", sizeof(a)/sizeof(double));
	printf("\nNumber of elements in b = %i\n", sizeof(b)/sizeof(int));
	printf("\nNumber of elements in c = %i\n", sizeof(c)/sizeof(float));

	int i;
	for(i=0; i< sizeof(a)/sizeof(double); i++)
	{
 		printf("a[%i] = %f\n", i, a[i]);
	}
	
	for(i=0; i< sizeof(b)/sizeof(int); i++)
	{
 		printf("b[%i] = %i\n", i, b[i]);
	}

	for(i=0; i< sizeof(c)/sizeof(float); i++)
	{
 		printf("c[%i] = %f\n", i, c[i]);
	}

	for(i=0; i< sizeof(d)/sizeof(double); i++)
	{
 		printf("d[%i] = %f\n", i, d[i]);
	}


	return 0;
}
	

