title: C Program Find Largest Element Array 1
signature: c_program_find_largest_element_array_1 <- function(arr, n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(arr, n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(arr, n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          list(10L, 12L, 14L, 16L, 17L, 17L, 20L, 24L, 26L, 28L, 37L, 38L, 41L, 45L, 49L, 50L, 59L, 61L, 63L, 65L, 65L, 66L, 69L, 70L, 70L, 73L, 73L, 74L, 81L, 81L, 83L, 87L, 94L, 97L), 17L, 
          97L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          list(-56L, 38L, -22L, 84L, -60L, 2L, 68L, -78L, 62L, -98L, 24L, 26L, 48L, 62L, -80L, -14L, -84L, 12L, -54L, -12L, -20L, -82L, 10L, -34L, -50L, -72L, 78L, 16L, 30L, -76L, 72L, 34L, 6L, 52L, 44L, 18L, -38L, 48L, -14L), 25L, 
          84L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 11L, 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          list(92L, 5L, 40L, 65L, 86L, 51L, 14L, 29L, 66L, 6L, 62L, 92L, 29L, 13L, 88L, 54L, 15L, 60L, 45L, 2L, 51L, 9L, 33L, 51L, 31L, 11L, 62L, 61L, 77L, 38L, 11L, 4L, 27L, 54L, 72L, 64L, 85L, 46L, 24L, 44L, 39L, 73L, 82L, 85L), 40L, 
          92L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          list(-92L, -90L, -84L, -80L, -80L, -76L, -70L, -70L, -48L, -44L, -38L, -28L, -14L, -14L, -12L, -2L, 2L, 4L, 6L, 10L, 16L, 16L, 20L, 22L, 24L, 26L, 50L, 52L, 56L, 56L, 58L, 58L, 74L, 80L, 82L, 84L, 86L), 33L, 
          86L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          list(0L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 1L, 0L), 29L, 
          1L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          list(5L, 19L, 20L, 26L, 31L, 32L, 34L, 37L, 39L, 40L, 46L, 46L, 50L, 53L, 58L, 58L, 59L, 65L, 72L, 72L, 75L, 76L, 77L, 78L, 81L, 83L, 83L, 95L, 98L, 99L), 28L, 
          99L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          list(32L, -84L, -84L, 86L, -24L, 36L, -12L, 82L, 48L, -12L, 82L, -76L, 84L, -20L, -12L, -18L, 46L, -74L, -14L, -86L), 14L, 
          86L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 33L, 
          1L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          list(95L, 73L, 74L, 14L, 73L, 74L, 19L, 93L, 34L, 53L, 85L, 75L, 80L, 15L, 36L, 57L, 15L, 98L, 51L, 37L, 8L, 9L, 62L, 71L, 28L, 24L, 37L, 53L, 84L, 76L, 22L, 48L, 15L, 19L, 43L, 88L, 58L, 38L, 63L, 68L, 27L, 22L, 37L, 76L, 59L, 66L, 22L), 34L, 
          98L
      )))
  
  }
  
  main()
source_py: def c_program_find_largest_element_array_1(arr, n):
      return max(arr)
source_cpp: int c_program_find_largest_element_array_1(vector<int> arr, int n) {
    return * max_element(arr.begin(), arr.end());
  }