begin procedure popstack if stack is empty return null endif data stack[toptop top return data end procedure implementation of this algorithm in cis as follows example int pop(int dataif(!isempty()data stack[top]top top return dataelse printf("could not retrieve datastack is empty \ ")