ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 


 

Company >> eSoft >> Interview Questions >> C++ General Interview Questions
 
  SQL Server Interview Questions (1)   Dot Net Framework Interview Questions (1)   C++ General Interview Questions (1)
 
Back to Questions Page
Question   What is the Maximum Size that an Array can hold? Rank Answer Posted By  
 Interview Question Submitted By :: -=PKG=-
I also faced this Question!!   © ALL Interview .com
Answer
Infinity
 
0 Chithra
 
 
Answer
it's depends upon the ram mamory.
 
3 Narendra Nagesh
 
 
Answer
32767
 
0 Kamal Aggarwal
 
 
 
Answer
it is dapand upon compiler to complier
 
0 Susheel Gurjar
 
 
Answer
it depand upon operating system to oprating system
 
0 Depak Patel
 
 
Answer
It depend upon the programmer need
 
0 Sunita
 
 
Answer
it depend upon the program
 
0 Priya
 
 
Answer
infinity
 
0 Payal Gupta
 
 
Answer
How many bite available in your ram
 
0 Sahadev Tarei
 
 
Answer
n numbers
 
0 Varsha Vilas Kalebag
 
 
Answer
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.
 
0 Chandra
 
 
Answer
It depends on the stack size. If the compiler option is 
chosen as default then the default stack size is 1MB and an 
array can be allocated upto 1MB size. If the array size 
exceeds this limit then the program will throw stack 
overflow error.
 
0 Prasant
 
 
Answer
it depends on User Application
 
0 Harish
 
 
Answer
its size is N-1, If it starts from 0.
 
0 Naresh
 
 
Answer
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.
 
5 Reejusri
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com