+ 3
Can we take size of array from user like Enter size and int a[size];
suggeste
7 Answers
+ 6
Meet Mehta your answer is incorrect, it will not work outside sololearn
+ 5
yes, you can dynamically allocate memory on heap.
like this->
int *array = new int[size];
and don't forget to free the memory by ,
delete array;
+ 3
In the case of a static matrix, the compiler will give an error message, either for dynamic matrix
example:
int x;
cin>>x;
int *p=new int[x];
đđ
+ 3
yeah at run time... by using dynamic memory allocation
0
If you are asking for this
https://code.sololearn.com/cJZIB0g7ZcSG/?ref=app
Hope it helpsâșïžâșïž.
0
What language?
0
ya