Size of matrix | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Size of matrix

If I globally declare a 2D matrix, say, int MAT[ ][ ]; then can I set the row size and column size of MAT later on in some other function? The required row and column number varies for different cases. I could just declare it as MAT[100][100]; because row,column is within 100. But I want to save memory.

5th Oct 2019, 7:01 AM
Zibran Zarif
Zibran Zarif - avatar
1 ответ
+ 1
Array size can't be changed dynamically.
5th Oct 2019, 7:07 AM
Kuri
Kuri - avatar