view CbC-examples/test_array.c @ 54:f62c169bbc24

Added tag cbc-4.4.3 for changeset d0e37615691e
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Feb 2010 18:30:54 +0900
parents 4c6926a2b9bc
children 5d30d517ebed
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");
}