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   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is the Maximum Size that an Array can hold?
 Question Submitted By :: -=PKG=-
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 1
Infinity
 
Is This Answer Correct ?    2 Yes 11 No
Chithra
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 2
it's depends upon the ram mamory.
 
Is This Answer Correct ?    5 Yes 4 No
Narendra Nagesh
 
 
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 3
32767
 
Is This Answer Correct ?    1 Yes 6 No
Kamal Aggarwal
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 4
it is dapand upon compiler to complier
 
Is This Answer Correct ?    3 Yes 1 No
Susheel Gurjar
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 5
it depand upon operating system to oprating system
 
Is This Answer Correct ?    2 Yes 1 No
Depak Patel
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 6
It depend upon the programmer need
 
Is This Answer Correct ?    0 Yes 3 No
Sunita
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 7
it depend upon the program
 
Is This Answer Correct ?    0 Yes 2 No
Priya
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 8
infinity
 
Is This Answer Correct ?    0 Yes 2 No
Payal Gupta
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 9
How many bite available in your ram
 
Is This Answer Correct ?    0 Yes 1 No
Sahadev Tarei
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 10
n numbers
 
Is This Answer Correct ?    1 Yes 0 No
Varsha Vilas Kalebag
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 11
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.
 
Is This Answer Correct ?    4 Yes 0 No
Chandra
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 12
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.
 
Is This Answer Correct ?    0 Yes 1 No
Prasant
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 13
it depends on User Application
 
Is This Answer Correct ?    0 Yes 2 No
Harish
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 14
its size is N-1, If it starts from 0.
 
Is This Answer Correct ?    1 Yes 0 No
Naresh
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 15
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 ?    2 Yes 1 No
Reejusri
[********]
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 16
it depend upon program
 
Is This Answer Correct ?    1 Yes 1 No
Vikas Anand
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 17
infinity
 
Is This Answer Correct ?    1 Yes 3 No
Sivasankar
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 18
java.lang.Integer.MAX_VALUE + 1
 
Is This Answer Correct ?    1 Yes 0 No
Arvind Giri
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 19
Oooops I thought its a java question
 
Is This Answer Correct ?    0 Yes 1 No
Arvind Giri
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 20
64 K
 
Is This Answer Correct ?    1 Yes 1 No
Bharat Biswal , Bhubaneswar
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 21
depends on the free space available on the ram
 
Is This Answer Correct ?    0 Yes 0 No
Amudha
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 22
infinite
 
Is This Answer Correct ?    0 Yes 1 No
Awadhesh
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 23
IT DEPENDS UPON THE RAM MEMORY
 
Is This Answer Correct ?    1 Yes 0 No
Yogesh Jain
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 24
array is a derived data type which is used to store 
different data items of same data type and same purpose 
with a common name
             array gives static memory allocation it means 
the size of array can not be changed during programe 
execution .
   array index always starts from zero andends at (n-1) if 
the array size is n.
 
Is This Answer Correct ?    1 Yes 0 No
Mousam Sahu
 
  Re: What is the Maximum Size that an Array can hold?
Answer
# 25
Dude in C memory management we have for segments namely
data code heap and stack. any local variable resides in
stack. Hence array should be less than size of stack. Please
refer memory models in C to find stack size. similar is true
for global array. That will reside in data segment.
 
Is This Answer Correct ?    0 Yes 0 No
Alok
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
Explain the ISA and HASA class relationships. How would you implement each in a class design?  2
When copy constructor can be used? Symphony4
Is there any difference between dlearations int* x and int *x? If so tell me the difference? Lason13
why we cant create array of refrences  2
what is meaning of isa and hsa  1
What is the difference between Pointer and a Reference? When you would use them? Wipro2
Explain about profiling?  1
Explain the difference between 'operator new' and the 'new' operator? Lucent1
What are advantages of C++ when comparing with C? HP3
class professor {}; class teacher : public virtual professor {}; class researcher : public virtual professor {}; class myprofessor : public teacher, public researcher {}; Referring to the sample code above, if an object of class "myprofessor" were created, how many instances of professor will it contain? a) 0 b) 1 c) 2 d) 3 e) 4 Quark1
what is pulse code modulation? Wipro1
What is the Maximum Size that an Array can hold? Satyam31
Do we have private destructors? Symphony9
Write any small program that will compile in "C" but not in "C++" Honeywell6
What is Memory Alignment? TCS1
Can we declare destructor as static? Explain?  2
when can we use copy constructor? HP3
catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e; Quark2
How to avoid changing constant values? Symphony1
What is Object Oriented programming.what is the difference between C++ and C? Infosys5
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 
   
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