Why can't the size of an array be initialized with variables in C language?

C99 does not specify that the size of the array can be defined with variables, but initialization will report an error after it is defined.
const int number=100;
int prime [number] = {2};
error message: [Error] variable-sized object may not be initialized;

C
Dec.30,2021

The

standard only says that you can use variables to define an array, but it doesn't say you can initialize the array / laugh

this is because your initializer ({0}) is determined at compile time, and your number is a quantity that can only be determined at run time, so the array is not sure at this time. How do you initialize a definite quantity to an uncertain quantity

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ebe9bb-29eb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ebe9bb-29eb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?