I always get a error by trying this. Isn't it possible to ask the user to enter the arraysize of a global variable / array? - The array has to be global.
#include <stdio.h>
// global
int size = 1;
char array[size];
int main(){
scanf("%d", &size);
}
OUTPUT: main.c:14:6: error: variably modified ‘array’ at file scope 14 | char array[size]; | ^~~~~