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
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Name an advantage of array over linked list? 
 Question Submitted By :: Kunal
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Name an advantage of array over linked list?
Answer
# 1
Array size is fixed.But Linked is not fixed
 
Is This Answer Correct ?    4 Yes 3 No
Santhosh K
 
  Re: Name an advantage of array over linked list?
Answer
# 2
Data acess is very faster in arrays
 
Is This Answer Correct ?    7 Yes 0 No
Santhosh K
 
 
 
  Re: Name an advantage of array over linked list?
Answer
# 3
memory requirement is less.
no pointers required..
 
Is This Answer Correct ?    6 Yes 0 No
Nidhi Singh
 
  Re: Name an advantage of array over linked list?
Answer
# 4
Linked List have an extra Overhead in its each node to 
store the pointer to the next node.
 
Is This Answer Correct ?    4 Yes 0 No
Chandan
 
  Re: Name an advantage of array over linked list?
Answer
# 5
I think linked list is better when compared to arrays 
because size of array is restricted to 
declaration.Insertion/Deletion of values in middle of array 
is not possible.
 
Is This Answer Correct ?    5 Yes 3 No
Anu
 
  Re: Name an advantage of array over linked list?
Answer
# 6
Arrays have random access and less overheads compared to
Linked list have sequential access only with too much 
overheads and no cache memory support.
On the other hand, arrays allow random access, while linked 
lists allow only sequential access to elements. Singly-
linked lists, in fact, can only be traversed in one 
direction. This makes linked lists unsuitable for 
applications where it's useful to look up an element by its 
index quickly, such as heapsort. Sequential access on 
arrays is also faster than on linked lists on many machines 
due to locality of reference and data caches. Linked lists 
receive almost no benefit from the cache.

Another disadvantage of linked lists is the extra storage 
needed for references, which often makes them impractical 
for lists of small data items such as characters or boolean 
values. It can also be slow, and with a naïve allocator, 
wasteful, to allocate memory separately for each new 
element, a problem generally solved using memory pools.
 
Is This Answer Correct ?    5 Yes 3 No
Sumeet Choudhury
 
  Re: Name an advantage of array over linked list?
Answer
# 7
as arrays are static in nature, therefore all operations
like memory allocation occur at the time of compilation
only. So processor has to put less effort at its runtime .
 
Is This Answer Correct ?    5 Yes 0 No
Neha Sharma
 
  Re: Name an advantage of array over linked list?
Answer
# 8
IN array we can directly access any element by index number 
but in linked list if we want to access any element then we 
have to go from starting and linearly we access that 
element.
 
Is This Answer Correct ?    4 Yes 2 No
Amandeep Singh Bhatia
 
  Re: Name an advantage of array over linked list?
Answer
# 9
Array can be access randomly and it can even access the 
middle element by just the array name with the 
subscript,eg, a[5].The elemente are allocated a contagious 
memory.Whereas in linked list more space is required for 
the pointer and the information.Accessing elements in 
linked list is sequential.
 
Is This Answer Correct ?    2 Yes 1 No
Eren Tsanglao
 
  Re: Name an advantage of array over linked list?
Answer
# 10
In arrays memory requirement is less as a refrence is not 
required whereas memory for the data as well as for the 
pointer is required and hence the overhead.
 Arrays allow random access, any element can be accessed 
using the subscript whereas linked lists allow sequential 
access, accessing of any element requires processing of the 
list from the beginning upto the element.
 
Is This Answer Correct ?    2 Yes 0 No
Gurpreet Kaur
 
  Re: Name an advantage of array over linked list?
Answer
# 11
The Main advantage of array data structure is which is used 
to hold like kind of data. in other words arrays hold 
(save) similar kind of data items and array items stored in 
contigues locations in memory. on the other hand link list 
may hold unlike kind of data (group of data) and items 
stored is not contigues in linked list.
 
Is This Answer Correct ?    5 Yes 0 No
Kiran
 
  Re: Name an advantage of array over linked list?
Answer
# 12
Function of bubble sort can not be performed in link list 
which is quite easy to perform in arrays
 
Is This Answer Correct ?    1 Yes 0 No
Upasna
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
difference between overloading and overridding  2
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required  5
WHEN A COPY CONSTER IS CALL ?  1
What is the differances between a abstract calss and interface Aviva2
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization? IntraLogic1
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile  3
Which is the only operator in C++ which can be overloaded but NOT inherited?  3
What is friend function? Wipro3
How would you stop a class from class from being derived or inherited. Ness-Technologies7
Difference between realloc() and free? HP3
What is Object and Class? What are the differences between them?  3
What is public, protected, private? Satyam4
How is data security provided in Object Oriented languages? ?  3
What is virtual class and friend class? Intel2
tell about copy constructor Siemens1
What is the Advantage of Interface over the Inheritance in OOPS?  2
WHAT IS ABSTRUCT DATA TYPE ? PLEASE EXPLAIN IT. HCL1
Why and when is a virtual destructor needed?  2
why we call c++ is object oriented lanaguage HCL2
What is the difference between and interface and an abstract class ? Ness-Technologies2
 
For more OOPS 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