+ 5
What is the maximum size of array that can be created ?
Ans is 32768 . Explain ?? Quiz Ques
19 Antworten
+ 21
In Javascript:
The maximum length until "it gets sluggish" is totally dependent on your target machine and your actual code, so you'll need to test on that (those) platform(s) to see what is acceptable.
However, the maximum length of an array according to the ECMA-262 5th Edition specification is bound by an unsigned 32-bit integer due to the ToUint32 abstract operation, so the longest possible array could have 232-1 = 4,294,967,295 = 4.29 billion elements.
+ 5
can have (2^32)-1
+ 3
the answer lies in the memory, since c++ consumes memory, say you have int type for your array means minimum size in bytes, the memory it eats multiplied by the number or elements in your array, so basically depends on the memory on a certain hardwaee
+ 3
.....memory, memory, memory.....
+ 2
and also depends upon the memory
+ 2
...if it are a cosmological array.....
+ 2
......beacause there is everything same of it....
+ 2
(2^32)-1
+ 2
the question is same like "what number of pages a notebook could have?"
You may have as many number of pages you want; in a notebook until it start looking weird or becomes too thick to fit in your bag.
The same thing applies in cpp too, you can have as many arrays you want until your machine runs out of memory or until it become too complicated to handle.
+ 2
who would want to populate an array up to its max length anyway?
+ 2
The maximum size of array that is equal to the memory size ie for 64 bit 2^64.
+ 1
I like leaning with sololean
+ 1
пук
0
elements
0
What is infinity, but haven't ,,border"
0
array[1000000] maximum size
0
i think 2^32 elements
0
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmrnmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm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mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
0
Explanation : Since array has index which is integer. Hence an array can store maximum number of values which corresponds to maximum value of signed integers . Which is 32768. Memory of system is another constraint but in modern systems they have large enough memory so we should not consider it. Hence to store large number of values it is good practice to create a Linked list or some other addressing data structures instead of array.