/* a3-3-1.c */
#include <stdio.h>

int main(void)
{
	/* 要素数5の整数型配列array1を宣言 */
	int array1[5];
	/* 整数型配列array2を 1, 2, 3, 4, 5 で初期化 */
	int array2[5] = {1, 2, 3, 4, 5};

	/* array2の要素を逆順にarray1に代入 */
	array1[0] = array2[4];
	array1[1] = array2[3];
	array1[2] = array2[2];
	array1[3] = array2[1];
	array1[4] = array2[0];

	/* array1の要素を表示 */
	printf( "array1[0] = %d\n", array1[0] );
	printf( "array1[1] = %d\n", array1[1] );
	printf( "array1[2] = %d\n", array1[2] );
	printf( "array1[3] = %d\n", array1[3] );
	printf( "array1[4] = %d\n", array1[4] );

	return 0;
}

