Dynamic memory allocation | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Dynamic memory allocation

https://code.sololearn.com/cduuEHHiwIF7/?ref=app In this code, while we are dynamically allocating memory for the 2D array, after 4 address why it is taking a gap of 16 bytes but when we are statically allocating 2D array then it does not have such gap.... what is the reason behind this???

30th Mar 2020, 3:09 PM
Pritam Adsul
Pritam Adsul - avatar
2 Respostas
+ 1
You dynamic allocate 3 ints of an array, why do you call them like a nested array? It doesn't make sense.
30th Mar 2020, 3:24 PM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar
0
I am trying to allocate 2D array..
30th Mar 2020, 3:52 PM
Pritam Adsul
Pritam Adsul - avatar