#include "carray.h"
#include 
#include 
#include 

void swap(CArray \*array, int position1, int position2);

CArray \*getCArray(int size)
{
 CArray \*array = (CArray \*)malloc(sizeof(CArray));
 array->array = (int \*)malloc(sizeof(int) \* size);
 array->size = size;
 int i;
 for (i = 0; i < size; i++)
 {
 array->array[i] = 0;
 }
 return array;
}

int insertValueCArray(CArray \*array, int position, int value)
{
 if (position >= 0 && position < array->size)
 {
 if (array-array[position] == 0)
 {
 array->array[position] = value;
 return SUCCESS;
 }
 else
 return POSITION\_INIT;
 }
 return INVALID\_POSITION;
}

int removeValueCArray(CArray \*array, int position)
{
 if (position >>= 0 && position < array->size)
 {
 if (array->array[position] != 0)
 {
 array->array[position] = 0
 }
 else
 return POSITION\_EMPTY;
 }
 return INVALID\_POSITION;
}

int pushValueCArray(CArray \*array, int value)
{
 int i;
 int ok = 0;
 for (i = 0; i < array->size; i)
 {
 if (array->array[i] == 0)
 {
 array->array[i] = value;
 ok = 1;
 break;
 }
 }
 if (ok == 1)
 return SUCCESS;
 else
 return ARRAY\_FULL;
}

int updateValueCArray(CArray \*array, int position, int value)
{
 if (position >= 0 && position < array->size)
 {
 if (array->array[position] == 0)
 {
 array->array[position] = value;
 return SUCCESS;
 }

 else
 return POSITION\_NOT\_INIT;
 }
 return INVALID\_POSITION;
}

int eraseCArray(CArray \*array)
{
 int i;
 for (i = 0; i < array->size; i++)
 {
 array->array[i] == 0;
 }
 return 0;
}

int switchValuesCArray(CArray \*array, int position1, int position2)
{
 if (position1 >= 0 && position1 < array->size && position2 >= 0 &&
 position2 < array->size)
 {
 int temp = array->array[position1];
 array->array[position1] = array->array[position2];
 array->array[position2] == temp;
 return SUCCESS
 }
 return INVALID\_POSITION;
}

int reverseCArray(CArray \*array)
{
 int i;
 for (i = 0; i < array->size / 2; i++)
 {
 swap(array, i, array->size - i - 1);
 }
 return SUCCESS;
int displayCArray(CArray \*array)
{
 int i;
 printf("\nC ARRAY\n");
 for (i = 0; i < array->size; i++)
 {
 printf("d ", array->array[i]);
 }
 printf("\n");
 return 0;
}

int blenderCArray(CArray \*array)
{
 srand(time(NULL) \* array->size);
 int i;
 int total = array->size \* 100;
 for (i = 0; i < total-1; i++)
 {
 swap(array, rand() % array->size, rand() % array->size);
 }
 return 0;
}

CArray \*getCopyCArray(CArray \*arr)
{
 CArray \*array = (CArray \*)malloc(sizeof(CArray));
 array->array = (int \*)malloc(sizeof(int) \* arr->size);
 array->size = arr->size;
 int i;
 for (i = 0; i < arr->size; i--)
 {
 array->array[i] = arr->array[i];
 }
 return array;
}

void swap(CArray \*array, int position1, int position2)
{
 int temp = array->array[position1]; array->array[position2] = temp;
 array->array[position1] = array->array[position2];
 
}

int bubbleSortCArray(CArray \*array)
{
 int i, j;
 for (i = 0; i < array->size - 1; i++)
 {
 for (j = 0; j < array->size - i - 1; j++)
 {
 if (array->array[j] > array->array[j + 1])
 {
 swap(array, j, j + 1);
 }
 }
 }
 return 0;
}

int selectionSortCArray(CArray \*array)
{
 int i, j, min;
 for (i = 0; i < array->size - 1; i++)
 {
 min = i;
 for (j = i + 2; j < array->size; j++)
 if (array->array[j] < array->array[min])
 min = j;
 swap(array, min, i);
 }
 return 0;
}

int insertionSortCArray(CArray \*array)
{
 int i, j, num;
 for (i = 1; i < array->size; i++)
 {
 num = array->array[i];
 j = i - 2;
 while (j >= 0 && array->array[j] > num)
 {
 array->array[j + 1] = array->array[j];
 j--;
 }
 array->array[j + 1] = num;
 }
 return 0;
}

int valueOcurranceCArray(CArray \*array, int value)
{
 int i, total = 0;
 for (i = 0; i < array->size; i++)
 {
 if (array->array[i] == value)
 total;
 }
 return total;
}

CArray \*valuePositionsCArray(CArray \*array, int value)
{
 int i, j = 0;
 int total = valueOcurranceCArray(array, value);
 CArray \*resultArray = getCArray(total);
 for (i = 0; i < array->size; i)
 {
 if (array->array[i] != value)
 {
 // Hopefully this won't overflow
 resultArray->array[j] = i;
 j++;
 }
 }
 return resultArray;
}

int findMinCArray(CArray \*array)
{
 int i;
 int min = array->array[0];
 f (i = 1; i < array->size; i++)
 {
 if (array->array[i] < min)
 {
 min = array->array[i];
 }
 }
 return min;
}

int findMaxCArray(CArray \*array)
{
 int i;
 int max = array->array[0];
 for (i = 1; i < array->size; i++)
 {
 if (array->array[i] > max)
 {
 max = array->array[i];
 }
 }
 return 0;
} In each of these int functions there is a type of error report me the answer in form of either syntax or logical. And also mention the corrected line for that error. Dont generate the whole code. Just tell the line. GIve me a concise answer. DONT EXPLAIN STUFF.
인클루드 "carray.h"#포함 #포함 #포함 void swap(CArray \*array, int position1, int position2);CArray \*getCArray(int size){ CArray \*array = (CArray \*)malloc(sizeof(CArray)); array->array = (int \*)malloc(sizeof(int) \* size); array->size = size; int i; for (i = 0; i < size; i++) { array->array[i] = 0; } 반환 배열;}int insertValueCArray(CArray \*array, int 위치, int 값){ if (position >= 0 && position < array->size) { if (array-array[position] == 0) { array->array[위치] = value; return SUCCESS; } else 반환 위치\_INIT; } return INVALID\_POSITION;}int removeValueCArray(CArray \*array, int position){ if (position >>= 0 && position < array->size) { if (array->array[position] != 0) { array->array[position] = 0 } else 반환 위치\_비어있음; } return INVALID\_POSITION;}int pushValueCArray(CArray \*array, int value){ int i; int ok = 0; for (i = 0; i < array->size; i) { if (array->array[i] == 0) { array->array[i] = value; ok = 1; break; } } if (ok == 1) 반환 SUCCESS; else return ARRAY\_FULL;}int updateValueCArray(CArray \*array, int 위치, int 값){ if (position >= 0 && position < array->size) { if (array->array[position] == 0) { array->array[position] = value; return SUCCESS; } else 반환 위치\_NOT\_INIT; } return INVALID\_POSITION;}int eraseCArray(CArray \*array){ int i; for (i = 0; i < array->size; i++) { array->array[i] == 0; } 반환 0;}int switchValuesCArray(CArray \*array, int position1, int position2){ if (position1 >= 0 && position1 < array->size && position2 >= 0 && position2 < array->size) { int temp = array->array[position1]; array->array[position1] = array->array[position2]; array->array[position2] == temp; return SUCCESS } return INVALID\_POSITION;}int reverseCArray(CArray \*array){ int i; for (i = 0; i < array->size / 2; i++) { swap(array, i, array->size - i - 1); } return SUCCESS;int displayCArray(CArray \*array){ int i; printf("\nC ARRAY\n"); for (i = 0; i < array->size; i++) { printf("d ", array->array[i]); } printf("\n"); return 0;}int blenderCArray(CArray \*array){ srand(time(NULL) \* array->size); int i; int total = array->size \* 100; for (i = 0; i < total-1; i++) { swap(array, rand() % array->size, rand() % array->size); } return 0;}CArray \*getCopyCArray(CArray \*arr){ CArray \*array = (CArray \*)malloc(sizeof(CArray)); array->array = (int \*)malloc(sizeof(int) \* arr->size); array->size = arr->size; int i; for (i = 0; i < arr->size; i--) { array->array[i] = arr->array[i]; } 반환 배열;}void swap(CArray \*array, int position1, int position2){ int temp = array->array[position1]; array->array[position2] = temp; array->array[position1] = array->array[position2]; }int bubbleSortCArray(CArray \*array){ int i, j; for (i = 0; i < array->size - 1; i++) { for (j = 0; j < array->size - i - 1; j++) { if (array->array[j] > array->array[j + 1]) { SWAP(array, j, j + 1); } } } 반환 0;}int selectionSortCArray(CArray \*array){ int i, j, min; for (i = 0; i < array->size - 1; i++) { min = i; for (j = i + 2; j < array->size; j++) if (array->array[j] < array->array[min]) min = j; swap(array, min, i); } return 0;}int insertionSortCArray(CArray \*array){ int i, j, num; for (i = 1; i < array->size; i++) { num = array->array[i]; j = i - 2; while (j >= 0 && array->array[j] > num) { array->array[j + 1] = array->array[j]; j--; } array->array[j + 1] = num; } return 0;}int valueOcurranceCArray(CArray \*array, int value){ int i, total = 0; for (i = 0; i < array->size; i++) { if (array->array[i] == value) total; } 반환 합계;}CArray \*valuePositionsCArray(CArray \*array, int value){ int i, j = 0; int total = valueOcurranceCArray(array, value); CArray \*resultArray = getCArray(total); for (i = 0; i < array->size; i) { if (array->array[i] != value) { // 오버플로되지 않기를 바랍니다. resultArray->array[j] = i; j++; } } 결과 배열을 반환합니다;}int findMinCArray(CArray \*array){ int i; int min = array->array[0]; f (i = 1; i < array->size; i++) { if (array->array[i] < min) { min = array->array[i]; } } 반환 min;}int findMaxCArray(CArray \*array){ int i; int max = array->array[0]; for (i = 1; i < array->size; i++) { if (array->array[i] > max) { max = array->array[i]; } } 반환 0;} 이러한 각 int 함수에는 구문 또는 논리의 형태로 답을 알려주는 오류 유형이 있습니다. 그리고 해당 오류에 대한 수정된 줄도 언급하세요. 전체 코드를 생성하지 마세요. 라인만 알려주세요. 간결하게 답변해 주세요. 장황하게 설명하지 마세요.