What is the Maximum Size that an Array can hold?

Answer Posted / sankalp bose

For arrays allocated on the stack, it depends upon the
maximum stack size. For example, for gcc, it is normally 64K
but may be something else. For arrays allocated dynamically
or arrays defined in global/static scope, this number is
different and depends upon the maximum heap area size and
the maximum data segment size respectively. The getrlimit
system call can be used to get all these values.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is iostream in c++ used for?

540


What does return 0 do in c++?

568


Give 10 points of differences between C & C++.

610


State the difference between delete and delete[].

564


What are the four main data types?

567






What is problem with overriding functions?

593


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

588


What are manipulators used for?

593


What is the C-style character string?

591


Explain friend class?

616


What is a pointer how and when is it used?

563


an operation between an integer and real always yeilds a) integer result b) real result c) float result

696


Explain the difference between class and struct in c++?

581


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

556


What is c++ vb?

598