non-pointer arith check

This commit is contained in:
Yaossg 2024-11-18 09:48:28 +08:00
parent 05f6b1906f
commit 12840c12f9
3 changed files with 60 additions and 35 deletions

View file

@ -16,7 +16,9 @@ void sort(int a[], int n) {
int main() {
int n;
int a[100];
printf("Enter the number of elements in the array: ");
scanf("%d", &n);
printf("Enter the elements of the array: ");
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}