NODE *head;
public:
void push(int value){
NODE *temp = (NODE*) new NODE;
temp->value = value;
temp->link = head;
head = temp;
}//end of push.
void pop(int&value) {
NODE *temp = head;
value = head->value;
head = head->link;
delete temp;
}//end of pop.
int is_empty(void){
return head == NULL;
}//end of is_empty.
STACK (void) {head = NULL;}
~STACK(){
int value;
while(!is_empty()) pop(value);
}//end of destructor.
};//end of STACK.
int main(void) {
STACK S;
int value;
S.push(5);
S.push(10);
S.push(15);
for(int i=0; i<3; i++){
S.pop(value);
cout<<"Popped: "<<value<<endl;
}//end of for.
return(0);
}//end of main.
Can anyone please tell me briefly what this program actually does and how it works?