C-Project
C-Project copied to clipboard
qsort.c error
C does not allow a variable to define an array size. For example, in line 10-11 of qsort.c it shows... int size = 5; int a[size] = {5, 4, 1, 3, 2}; // This creates an error.
Main.c:11:4: error: variable-sized object may not be initialized 11 | int a[size] = {5, 4, 1, 3, 2};
instead, use #define size 5 int a[size] = {5, 4, 1, 3, 2};