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 class and structure in c++?
Which software is used to run c++ program?
Is it possible for a member function to delete the pointer, named this?
Difference between an inspector and a mutator
Can recursive program be written in C++?
Write a function that swaps the values of two integers, using int* as the argument type?
Is it possible to use a new for the reallocation of pointers ?
What language does google use?
Write a Program for find and replace a character in a string.
What is class in c++ with example?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What are the advantages of using pointers in a program?
What is c++ prototype?
Describe the advantages of operator overloading?
What is the size of integer variable?