What is the Maximum Size that an Array can hold?
Answer Posted / chandra
On Windows platform (32 bit) the max array size is FFFFFFFF.
so if you give int arr[0x3FFFFFFF]; it works in VC++.
and if you try arr[0x40000000]; it gives following error:
error C2148: total size of array must not exceed ffffffff
bytes
We came to this value(3FFF FFFF) by dividing FFFFFFFF (2
power 32) by 4 because each int is 4 byte. so for char
array this value will be full FFFF FFFF.
| Is This Answer Correct ? | 54 Yes | 7 No |
Post New Answer View All Answers
What is constructor in C++?
What new()is different from malloc()?
Explain the difference between struct and class in terms of access modifier.
How do I run a program in notepad ++?
Explain mutable storage class specifier.
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
Write a program to interchange 2 variables without using the third one.
How static variables and local variablesare similar and dissimilar?
Briefly describe a B+ tree. What is bulk loading in it?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
What are the operators in c++?
What is std namespace in c++?
What's the order in which the local objects are destructed?
What is the use of c++ programming language in real life?