The main program calls the function PrintList that outputs the elements in the list. Trace the code and give the outputs #1 to #5
#include <iostream.h>
typedef int DataType;
#include "aseqlist.h"
void PrintList const SeqList &L
{
for (int i=0;i<L.ListSize();i++)
cout <<L.GetData(i)<<" ";
cout << endl;
}
void main(void)
{
SeqList L;
L.Insert(5);
L.Insert(10);
L.Insert(1);
L.Insert(15);
PrintList(L); //Output #1 ____
if (L.GetData(1)==10)
L.DeleteFront();
PrintList(L); //Output #2 ____
L.Insert(25);
L.Delete(1);
cout << L.ListSize()<< endl; // Output #3 ____.
PrintList(L); //Output #4 ____
while (!L.ListEmpty())
{
cout << L.GetData(0)<<endl;
L.Delete(L.GetData(0));
}
} // Output #5 ____