answersLogoWhite

0

Maximum value of an array

Updated: 8/10/2023
User Avatar

Wiki User

15y ago

Best Answer

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 bytes per element (8 bytes on 64-bit systems). Arrays of objects or structures would likely require more memory per element.

For all practical purposes, the maximum size is 2,147,483,647 elements, which is the maximum positive range for a 4-byte integer (0x7FFFFFFF). At 1 byte per element, that works out at 2GB.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

One dimensional array creates the number array which has 50 components, each capable of holding one integer value . in other words the number array has a total of 50 components . all of type integer

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

There is no such thing.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Platform-dependent.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Maximum value of an array
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to find the maximum value of 25 element in an array?

int findMax(int *array) { int max = array[0]; for(int i = 1; i < array.length(); i++) { if(array[i] > max) max = array[i] } return max; }


What is sparce array?

sparse array is one which has contents lower than its maximum size, that is the array has free or empty locations....


What is the maximum size of array in c?

Platform-dependent.


Write a function in c that returns the largest value stored in an array-of-int Test the function in a simple program?

int max(int arr[], int arrSize){int maximum = arr[0];for (int i = 0; i < arrSize; i++){if (maximum < arr[i]){maximum = arr;}}return maximum;}


The maximum number of records you might want to store in an array is defined as MAX When using 0 based indexing what index will reference the last allocated position of an array of size MAX?

If all elements of the array are in use then the last record is referred to as MAX-1. If you are using a count variable to remember how far into the array you are using then this variable will keep track of the last allocated value in the array.


Array is value type or reference type in CSharp?

Array is a class name, hence ought to be a value type.


What is maximum value?

What is maximum value


How do you print an array in php?

There are a few methods however the following is the method that will allow you to do the most with the information afterwards. foreach($array as $key =&gt; $value){ echo '[' . $key . '] ' . $value; #$key becomes the array key and value because what the current array item has inside. }


What is array in C languange?

An array is a contiguous block of data in memory. When you declare an array in C you need to give it a type and a name (like a normal variable), plus you need to give it a size. // normal integer variable x int x; // array of 10 integers int x[10]; Remember that the variable x is actually just a pointer, or reference, to a point in memory. This point in memory is the start of the array, so the value at x[0] is the first value in the array, x[1] is the second, and so on. Also remember that C has no bounds checking, so you can, indeed, read any value past the maximum. x[3474] would return an integer value, but it's going to be some part of memory that is not in your array. Attempting to change this value could result in something very bad happening.


How to find max and min values?

Find the minimum and maximum of what? An array?


What is the Maximum limit of array size in c language?

Platform-dependent.


Passing an array name to a pointer assigns the first memory location of the array to the pointer variable?

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.