This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gcc -std=c99 due to loop initialiser - stupid GCC defaulting to C89 :( */ | |
#include <stdio.h> | |
#define ARRAY_SIZE(x) \ | |
((sizeof(x) / sizeof(x[0]))) | |
void count_and_process_items(unsigned int (*array)[10]) | |
{ | |
for (int i = 0; i < ARRAY_SIZE(*array); ++i) { | |
printf("Item %d = %d\n", i, (*array)[i]); |
NewerOlder