What is the Maximum Size that an Array can hold?

Answer Posted / reejusri

Maximum size has nothing to do with only the stack area,
but the area where the array is allocated from. The OP did
not say whether the array was created from dynamic memory
(a.k.a the heap), block or local memory (a.k.a. the stack),
or where automatic variables are declared.

The amount of memory available depends on:
1. The total memory on the platform.
2. The amount of memory allocated to the program.
3. The compiler's settings.

Is This Answer Correct ?    17 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between new and malloc?

829


What is stream and its types in c++?

784


What is the best way to declare and define global variables?

958


What is the v-ptr?

926


what are the characteristics of Class Members in C++?

832


What is virtual destructor? What is its use?

806


What relational operators if statements in c++?

907


Do the parentheses after the type name make a difference with new?

873


How many ways can a variable be initialized into in C++?

803


Explain what is class definition in c++ ?

821


What is a float in c++?

756


Why do we use string in c++?

726


How is c++ different from java?

799


What does new return if there is insufficient memory to make your new object?

802


What is buffer and example?

730