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

How to demonstrate the use of a variable?

646


Why do we need constructors in c++?

624


What is a type library?

691


Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL

342


When is the destructor called?

608






What is #include iostream?

749


What is an arraylist c++?

692


Can I learn c++ as my first language?

614


What does iomanip mean in c++?

611


How a pointer differs from a reference?

698


What happens if a pointer is deleted twice?

796


Can you write a function similar to printf()?

671


What is the full form of dos?

573


What is the identity function in c++? How is it useful?

555


How can you quickly find the number of elements stored in a static array?

645