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

int main(void)
{
	/* 整数型変数tempを宣言 */
	int temp;
	/* 整数型配列arrayを 1, 2, 3, 4, 5 で初期化 */
	int array[5] = {1, 2, 3, 4, 5};

	/* arrayの要素を逆順にarrayに代入 */
	temp = array[0];
	array[0] = array[4];
	array[4] = temp;
	temp = array[1];
	array[1] = array[3];
	array[3] = temp;

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

	return 0;
}
