view test_array.c @ 0:bacef8675607

init repository
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 14 Oct 2014 17:34:59 +0900
parents
children 35d6eabeadb0
line wrap: on
line source

//#include<stdio.h>
void print_array(int *, int);

int main(int argc, char **argv){
	int array[10] = {10, 2, 3, 0, 7, 5};
	array[1] += array[2]+array[4];
	print_array(array, 10);
	return 0;
}

void print_array(int *a, int size){
	while( size-->0 ){
		printf(" %7d", *a++);
	}
	printf("\n");
}