#include <stdio.h>


int smallest(int arr[], int arr_size, int *res)
{
  if (arr == NULL)
    return 1;
  
  int smallest;
  smallest = arr[0];



  int i;
  for (i = 1; i < arr_size; i++)
    {

      if (arr[i] < smallest)
	{
	  smallest = arr[i];
	}
    }

  *res = smallest;

  return 0;
}

int main ()
{
  
  int arr[] = {6789,65,45,25,852,-69,34,478,32};

  int arr_size = sizeof(arr) / sizeof(int);
  int *res = NULL;
  int ret;
  res = &ret;
  
  smallest(arr, arr_size, res);
  
  if (res != NULL)
    printf("%d\n", *res);

  return 0;
}
