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 a singleton class c++?
You want to link a c++ program to c functions. How would you do it?
What are punctuators in c++?
How do you clear a buffer in c++?
Can comments be nested?
Write a program to find the Fibonacci series recursively.
What is constructor c++?
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
What are move semantics?
Should I learn c or c++ or c#?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is virtual function? Explain with an example
What is a wchar_t in c++?
What is runtime polymorphism in c++?
How do you add an element to a set in c++?