• We need your support!

    We are currently struggling to cover the operational costs of Xtremepapers, as a result we might have to shut this website down. Please donate if we have helped you and help make a difference in other students' lives!
    Click here to Donate Now (View Announcement)

Help! AS Computing!

Messages
584
Reaction score
555
Points
103
Can anyone explain the following questions in detail! 1. Describe 3 methods to solve clashing. 2. State a problem when i) data is added into an array on a stack. ii) when data is read from the stack. Explain how the stack pointer could be used to solve the problem. Someone please help me! I am stuck!
 
Messages
878
Reaction score
1,474
Points
153
1)Whn a clash occurs the simplest solution would be to look serially for the consequent memory locations until a vacant one is found..the other two methods would be using linked lists and overflow memory. I assume this question carries 6 marks so u have to describe each method..u can find that in Sir zafar's notes or frm mark schemes..

The pointer cant be used to solve the problem..it can only be used to tell if the stack has some data or its empty
2) i) Error will occur if the stack is full and we try to add additional data into it...this error is called stack overflow...now we know that stack has only 1 pointer so if the pointer is pointing outside the stack then it means its full
i) If the stack is empty and a delete operation is attempted the computer will give an error which is called stack underflow......we can know that the stack is empty if the stack pointer is pointing at the first location in the stack
 
Messages
878
Reaction score
1,474
Points
153
download this..it has answers to the exercise questions too including the ones u asked...plus the examiner comments
 

Attachments

  • computerstudiesas.pdf
    898.9 KB · Views: 15
Top