What would you like to do?

How can you increase the size of a statically allocated array?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

int arr[10]; When an array is declared as above, memory is allocated for the elements of the array when the program starts, and this memory remains allocated during the lifetime of the program. This is known as static array allocation. Hence we cannot increase size of statically allocated array.
1 person found this useful
Thanks for the feedback!

Can you increase cache memory by allocating memory from static RAM?

Cache memory is always static RAM while ram is DRAM. Cache memory may be static or dynamic but with most modern microprocessors cache memory is internal to the CPU package a

Can you increase the size of cache memory by allocating memory space from RAM?

cache memory efficiency is derived from its ability to perform parallel search which is incorporated in its hardware .so if we use a part of main memory as cache then that pro

Difference between dynamic and static memory allocation in C?

MEMORY ALLOCATION MODELS……   STATIC MEMORY ALLOCATION   |   DYNAMIC MEMORY ALLOCATION   / Memory is allocated before the execution of the program begins.

Difference between static array and dynamic array?

Static array is predefined array whose size is defined before the execution of program while Dynamic array is not a predefined array its size is defined on run time, during th

Why array is called static data structure?

The structure of an instance of array is FIXED (static, not changing) throughout its life time. The content of that array may be changed over the life time (it maybe very brie

What do you understand by static memory allocation and dynamic memory allocation?

As to physical memory: Static memory will store its data as long as power is available. It is commonly used with a battery to retain small amounts of data when the main power

What is the maximum size that an array can hold?

The maximum number of elements will depend on the type of array and the available memory. An array of char requires only 1 byte per element but an array of pointers requires 4

How can you increase the size of a dynamically allocated array?

/* Allocate space for an array with ten elements of type int. */ int *ptr = malloc (10 * sizeof (int)); if (ptr == NULL) { /* Memory could not be allocated, the program s

What is the difference between static array and dynamic array?

A static array is instantiated at compile time and exists for the entire duration of a program. The amount of memory allocated to a static array is fixed and cannot be altered

Why arrays are called static data structure?

An array could be called static because it is generally not changed structurally once it is created, meaning that you do not add, delete or swap the nodes themselves, though y

What is static memory allocation and dynamic memory allocation?

A Static memory allocation can be defined as a predefined memory allocation by the programmer independent and non-changable by the user during execution of the program but whe

What is static and dynamic channel allocation?

In static channel allocation voice channels(definite set of frequencies) is allocated to each cell. But in dynamic channel allocation channels are provided at the time of req

What is difference in static and dynamic memory allocation?

  Dynamic memory allocation is at runtime. static memory allocation is before run time, but the values of variables may be changed at run time. Static memory allocation