Код: Выделить всё
#include
#define SIZE 10
void swap_elements(int *array, size_t size);
int main(void) {
puts("Enter elements of the array and the code will reverse the array.");
int array[SIZE];
for (int i = 0; i < SIZE; i++) {
printf("Enter element %d: ", i);
scanf("%d", &array[i]);
}
puts("Array before reversing:");
for (int i = 0; i < SIZE; i++) {
printf("%5d", array[i]);
} puts("");
swap_elements(*array, SIZE);
}
void swap_elements(int *array, size_t size) {
for (int i = 1; i
Подробнее здесь: [url]https://stackoverflow.com/questions/78212257/how-do-i-fix-an-access-violation-error-in-c[/url]
Мобильная версия