endif top top stack[topdata end procedure implementation of this algorithm in cis very easy see the following code example void push(int dataif(!isfull()top top stack[topdataelse printf("could not insert datastack is full \ ")pop operation accessing the content while removing it from the stackis known as pop operation in an array implementation of pop(operationthe data element is not actually removedinstead top is decremented to lower position in the stack to point to the next value but in linked-list implementationpop(actually removes data element and deallocates memory space pop operation may involve the following steps step checks if the stack is empty step if the stack is emptyproduces an error and exit step if the stack is not emptyaccesses the data element at which top is pointing step decreases the value of top by step returns success algorithm for pop operation