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

Malloc question

If I do malloc(10 * sizeof(int)); does it mean that I am allocating 10 ints (taking consideration that int has 4 bytes) ?

20th Jul 2020, 3:14 PM
JoĆ£o Vitor
JoĆ£o Vitor - avatar
2 Respostas
20th Jul 2020, 3:22 PM
BroFar
BroFar - avatar
+ 1
Please read the below page to clear your doubt šŸ‘‡ http://www.cplusplus.com/reference/cstdlib/malloc/
20th Jul 2020, 3:20 PM
Ipang