Computer Science, asked by Gerem9763, 1 year ago

Can you dynamically allocate arrays in expanded memory in c?

Answers

Answered by CyberPhase
0

Yes, by using the “malloc()” and “calloc()” functions

—————————

Visit my YouTube channel

bit.ly/cyberphase

Do subscribe

Answered by SaurabhJacob
0

A dynamic array is similar to a regular array, except that its size can be changed during program runtime.DynamArray elements occupy a contiguous block of memory.

  •  Once an array is created, its size cannot be changed in any way.  A dynamic array is different though.  
  • It is possible to expand the size of a dynamic array even after it is full.
  • In C++ we can create a dynamic array by using the new keyword.  The number of items to be assigned is specified in a pair of square brackets.  
  • The type must precede the name.  Requested number of items can be allocated.

#SPJ2

Similar questions