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
Differentiate between late binding and early binding. What are the advantages of early binding?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
How does work in c++?
What is a unnitialised pointer?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What are the stages in the development cycle?
What are the advantage of using register variables?
What are the differences between malloc() and calloc()?
Why c++ does not have finally?
Which field is used in c++?
What you know about structures in C++?
What do you mean by funtion prototype?
What is a Default constructor?
What is == in programming?
Does improper inheritance have a potential to wreck a project?