#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MAX_RANDOM_VALUE 1000
#define ARRAY_SIZE 10

int *find_largest(int a[], int n) {
  int highest_number_index = 0;
  for (int i = 0; i < ARRAY_SIZE; i++) {
    if (a[i] > highest_number_index) {
      highest_number_index = i;
    }
  }
  return &a[highest_number_index];
}

int main() {
  int random_numbers_array[ARRAY_SIZE];
  int *highest_index;
  srand(time(NULL));
  for (int i = 0; i < ARRAY_SIZE; i++) {
    random_numbers_array[i] = rand() % MAX_RANDOM_VALUE + 1;
  }
  highest_index = find_largest(random_numbers_array, ARRAY_SIZE);
  printf("HI: %p\n", highest_index);
  printf("VALUE: %d", *highest_index);
}
