#include #define N_DATA 8 int data[N_DATA] = { 12, 23, 98, 45, 11, 92, 56, 79 }; int find_max(int data[], int start, int n) { int i, max_id; max_id = start; for (i = start + 1; i < n; i++) { if (data[i] > data[max_id]) max_id = i; } return max_id; } int main(void) { int max_idx; max_idx = find_max(data, 0, N_DATA); printf("°¡Àå Å« °ªÀº %d ÀÔ´Ï´Ù.\n", data[max_idx]); }