Doubt in static allocation

int r, c;
cin >> r >> c;
int matrix[r][c];

when this part of code is run , the inputs sizes are given during runtime ,so how is it static or compile time allocation??

@vaibhave31 basic diff is when u use new keyword the array is made dynamically in heap else made in stack

@vaibhave31,
refer here https://dotnettutorials.net/lesson/static-vs-dynamic-array/#:~:text=Static%20array%20means%20the%20size,its%20size%20cannot%20be%20modified.

its dynamic only and in vid lecture also prateek bhaiya didnt told the case of user giving input, the eg taken was array with size

@vaibhave31 is the doubt resolved?

yes, it is resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.