difference between array and stack

 Posted by Kamlesh420 on 12/8/2011 | Category: .NET Framework Interview questions | Views: 2715 | Points: 40

There are two main differences between an array and a stack. Firstly, an array can be multi-dimensional, while a stack is strictly one-dimensional. Secondly, an array allows direct access to any of its elements, whereas with a stack, only the 'top' element is directly accessible; to access other elements of a stack, you must go through them in order, until you get to the one you want

Source: cognigant | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Akiii on: 12/9/2011 | Points: 10
good one...


Login to post response

More Interview Questions by Kamlesh420