GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Concepts  >  Data Structures
Go To First  |  Previous Question  |  Next Question 
 Data Structures  |  Question 156 of 202    Print  
What is the difference between ARRAY and STACK?

  
Total Answers and Comments: 5 Last Update: March 01, 2007     Asked by: ramesh_etta 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 10, 2006 00:10:09   #1  
rose        

RE: What is the difference between ARRAY and STACK?

STACK follows LIFO. Thus the item that is first enetered would be the last removed.

In array the items can be entered or removed in any order. Basically each member access is done using index. No strict order is to be followed here to remove a particular element.


 
Is this answer useful? Yes | No
December 14, 2006 00:11:40   #2  
Pushpa Siva Kumar        

RE: What is the difference between ARRAY and STACK?

Array is a linear Data Structure in which insertion and deletion can take place in any position. The elements can be retrieved randomly in Arrays.

Stack is also a linear data structure in which insertion and deletion will take place at the top position alone. It follows LIFO order i.e. last in first out. The element in the top most position alone can be retrieved.


 
Is this answer useful? Yes | No
February 06, 2007 06:25:28   #3  
sivanesh.a Member Since: December 2006   Contribution: 189    

RE: What is the difference between ARRAY and STACK?
Arrays : stored in random orderStack: stored in LIFO order.
 
Is this answer useful? Yes | No
March 01, 2007 00:19:30   #4  
Jyotiranjan        

RE: What is the difference between ARRAY and STACK?
All the above comments are true but I want to add to it is that the size of array is fixed while in a stack its not fixed.It something like dynamic allocation.Its size can grow and shrink.
 
Is this answer useful? Yes | No
March 01, 2007 00:30:22   #5  
j4jrm84 Member Since: March 2007   Contribution: 1    

RE: What is the difference between ARRAY and STACK?
Basic Difference is that the size of array is fixed while stack size can grow and shrink.Stack is a dynamic concept
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape