We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
that i remember in c i need a malloc(sizeof(data-tipe size * element numbers)) to allow the memory for each element in the array, however i see in c ++ create a new instance of array * allow you create a new array with the size of the number of elements.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
that i remember in c i need a malloc(sizeof(data-tipe size * element numbers)) to allow the memory for each element in the array, however i see in c ++ create a new instance of array * allow you create a new array with the size of the number of elements.