two basic operations on a stack are
Push i.e inserting element to a stack
and pop : removing element from a stack
stack.top() gives A reference to the top element in the stack
stack.top()-1 will give top element and subtract 1 from it
4 th index
1. Show what is produced by the following C+ code. Assume the node is in the usual info-link
form with the info of the type int. (list, trail, and current are pointers of type nodeType.)
list = new nodeType; /creates list as new nodeType
list -> info = 28
The value of the expression i7 % 7 is 3
The following is the newline character
In a c+ program double variables and input are 10.5 and 30.6
One = 10.5 : two = 30.6
The value of the expression 33/10 assuming both values are integer data type is
1. What is Linked Lists?
Linked lists are a way to store data with structures so that the programmer can automatically create a
new place to store data whenever necessary.
2. What is a Node?
Class definition that contains variables holding information abo
Alexis D Rojas
February 3, 2013
using namespace std;
1. What is the output, if any, of each of the following C+ statements?
a. cout <current-> info;
current is pointing to the current node. current->info will extract and display the value or data strored
in that node.
b. current = current -> link;
print('8818 Beau Monde Dr')
print('My major is Electrical Engineering')
A=float(input('Please enter the price for pencils $')
B=float(input('Please enter the