CS Paper2
CS Paper2
162
}
void update()
{ qty += pqty;
if(prate!=rate)
rate=prate;
amt = qty * rate;
}
void display()
{ super.display();
update();
super.display();
}
}
Question 12
A stack is a linear data structure which enables the user to add and remove integers from [10]
one end only, using the concept of LIFO(Last In First Out). An array containing the marks
of 50 students in ascending order is to be pushed into the stack.
164