✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
**
* Helyet foglal dinamikusan egy n elemű tömbnek és visszatér a lefoglalt memória címével
* @param n tömb elemeinek a száma
* @return a lefoglalt tömb kezdőcímét
*/
és definíció:
int *allocateMemoryForArray1(int n) {
int *array=(int*)malloc(n*sizeof (int));
if(!array)
{
printf("Memory allocation error");
return NULL;
}
return array;
}
Mely kijelentések igazak?