------------This function displays the contents of stack 2--------------------------------*/
| 79 | |
| 80 | /*------------This function displays the contents of stack 2--------------------------------*/ |
| 81 | void display_2(){ |
| 82 | |
| 83 | if(top_2 == SIZE){ |
| 84 | cout << "Stack is empty" << endl; |
| 85 | return; |
| 86 | } |
| 87 | cout << "The Stack 2 elemnts are : "; |
| 88 | |
| 89 | for(int i = top_2; i < SIZE - 1; i++) |
| 90 | cout << arr[i] << " ---> "; |
| 91 | cout << arr[SIZE - 1] << endl; |
| 92 | } |
| 93 | |
| 94 | |
| 95 | int main(){ |