+ 5

What is the maximum size of array that can be created ?

Ans is 32768 . Explain ?? Quiz Ques

17th Jan 2017, 11:36 AM
Nirakh Rastogi
Nirakh Rastogi - avatar
19 Answers
+ 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.
17th Jan 2017, 11:51 AM
Ahmad
Ahmad - avatar
+ 5
can have (2^32)-1
18th Jan 2017, 1:57 PM
Yash Saxena
Yash Saxena - avatar
+ 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
18th Jan 2017, 10:22 AM
Mark L. M.
Mark L. M. - avatar
+ 3
.....memory, memory, memory.....
18th Jan 2017, 7:00 PM
Király Zoltán
Király Zoltán - avatar
+ 2
and also depends upon the memory
18th Jan 2017, 1:58 PM
Yash Saxena
Yash Saxena - avatar
+ 2
...if it are a cosmological array.....
18th Jan 2017, 6:57 PM
Király Zoltán
Király Zoltán - avatar
+ 2
......beacause there is everything same of it....
18th Jan 2017, 6:59 PM
Király Zoltán
Király Zoltán - avatar
+ 2
(2^32)-1
19th Jan 2017, 8:34 AM
Guddu G
Guddu G - avatar
+ 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.
19th Jan 2017, 1:47 PM
Manoj Singh
Manoj Singh - avatar
+ 2
who would want to populate an array up to its max length anyway?
20th Jan 2017, 3:07 AM
Erwin Mesias
Erwin Mesias - avatar
+ 2
The maximum size of array that is equal to the memory size ie for 64 bit 2^64.
30th Jan 2017, 10:26 AM
Monali Chavare
Monali Chavare - avatar
+ 1
I like leaning with sololean
18th Jan 2017, 3:11 PM
wasiu.a.olaonipekun
wasiu.a.olaonipekun - avatar
+ 1
пук
19th Jan 2017, 4:37 PM
Pookin PuK
Pookin PuK - avatar
0
elements
18th Jan 2017, 1:57 PM
Yash Saxena
Yash Saxena - avatar
0
What is infinity, but haven't ,,border"
18th Jan 2017, 6:56 PM
Király Zoltán
Király Zoltán - avatar
0
array[1000000] maximum size
19th Jan 2017, 9:30 PM
Bilal Niazi
Bilal Niazi - avatar
0
i think 2^32 elements
27th Jan 2017, 4:16 PM
Idan Moral
Idan Moral - avatar
0
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmrnmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm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mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
17th Mar 2017, 6:20 PM
Baxter
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.
20th Mar 2017, 4:07 PM
Nirakh Rastogi
Nirakh Rastogi - avatar