The array name is a reference to the start address of the array, so simply take its address.
int a[10];
int* p1 = &a;
If the array is allocated on the heap, then there is no name (all allocations on the heap are anonymous). However, you don't need a name since you already know the address:
int* p2 = malloc (10 * sizeof (int));
congugative memory allocation ,is use to array
congugative memory allocation ,is use to array
Basically, &array[i]; That is, the memory location for an array object with index i. Or, you can do: (array + i);
An array of pointers to string would contain, per array position, a number dictating which memory address holds the string data. For example, position [0] in an array would contain a memory address. This memory address can be de-referenced to obtain the actual information held within that memory address.
void *array[2]; printf ("array[%d]=%p\n", i, array[i]);
Yes, passing an array name to a pointer assigns the first memory location of the array to the pointer variable. An array name is the same as a pointer to the first location of the array, with the exception that an array name is a r-value, while a pointer is an l-value.
An array is an aggregate of data elements of the same type. Arrays are allocated in contiguous memory. An element of an array can be another array type, also known as a multi-dimensional array.
An array is a contiguous section of computer memory that contains elements of equal size. A linked list are non-contiguous sections of memory that contain data that is dynamically allocated and released as necessary. Arrays are fixed in size. Changing the size requires significant processing power. They are quick to retrieve an element by index in the array. Finding elements in the array requires less code, and so is also faster. They also use less memory, since only one memory "pointer" is needed to locate the entire array. Arrays are best used when there are many elements and the overall size of the array will not change often. Linked lists are variable in size. Changing the size requires virtually no processing power relative to arrays. Finding an element by index requires significant processing power. They use more memory, as each element requires at least one additional "pointer" to locate another node (some use two). Linked lists are best used when there are a limited number of elements that will be fairly often added and removed in a way that would incur the array's high cost of resizing itself frequently.
First locate the position of an array by search after than use a delete function to delete an array
No, it use memory, just like any other variable.
A reallocation. Note that whenever we reallocate an array, we increase the size of the current allocation if there is sufficient free memory beyond the current allocation or we allocate entirely new memory if there isn't. But when we reduce the size of an array, we simply release the redundant memory at the end of the array; we never allocate new memory. However, because the amount of memory being allocated has to either increase or reduce in size, both are termed a reallocation.
Contiguous memory address are allocated to an array or vector.