1. What is the state of the stack after the following sequence of pushes and pops: Stack *s; s->push( 3 ); s->push( 5 );
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. What is the state of the stack after the following sequence of pushes and pops: Stack *s; s->push( 3 ); s->push( 5 );
1. What is the state of the stack after the following sequence of pushes and pops: Stack *s; s->push( 3 ); s->push( 5 ); s+push( 2 ); s->push( 15 ); s->push( 42 ); s-popO; spopO; s+push( 14 ); s>push( 7); spopO; s+push( 9 ); spopO; spopO; s->push( 51 ); spopO; spopO;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!