Memory created is dynamic or static

#include< iostream>

#include< unordered_set>

using namespace std;

bool checksum( int arr[], int n ){

//code

}

int main(){

int n;

cin >> n ;

int arr[n];

//code

}

So in the video “check subarray with sum zero” the memory of the array which is created is dynamic or static because the value of n is taken at runtime ?

It is actually static memory allocation (since they are kept in stack memory).
You can find your answers here

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.