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 sorting algorithm does c++ use?

872


What is a local variable?

827


Explain terminate() and unexpected() function?

833


What c++ is used for?

831


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

1944


What is #include cmath?

837


What is the insertion operator and what does it do?

793


What is the object serialization?

850


What is split a string in c++?

908


How is static data member similar to a global variable?

833


Difference between Abstraction and encapsulation in C++?

824


Is swift faster than c++?

754


What do you mean by function overriding & function overloading in c++?

799


Why do we use iterators?

829


Explain how we implement exception handling in c++?

789