#include #include #include #include using namespace std;int main(){int myints[] = {};list l, l1 (myints, myints + sizeof(myints) / sizeof(int));list::iterator it;int choice, item;while (1){cout<><>cout<"***list>"***list><>cout<><>cout<"1.insert element="" at="" the="">"1.insert><>cout<"2.insert element="" at="" the="">"2.insert><>cout<"3.front element="" of="">"3.front><>cout<"4.last element="" of="" the="">"4.last><>cout<"5.size of="" the="">"5.size><>cout<"6.display forward="">"6.display><>cout<><>cout<"enter your="" choice:="">"enter>cin>>choice;switch(choice){case 1:cout<"enter value="" to="" be="" inserted="" at="" the="" front:="">"enter>cin>>item;l.push_front(item);break;case 2:cout<"enter value="" to="" be="" inserted="" at="" the="" end:="">"enter>cin>>item;l.push_back(item);break;case 3:cout<"front element="" of="" the="" list:="">"front>cout<><>break;case 4:cout<"last element="" of="" the="" list:="">"last>cout<><>break;case 5:cout<"size of="" the="" list:="">"size><><>break;case 6:cout<"elements of="" the="" list:="">"elements>for (it = l.begin(); it != l.end(); it++)cout<><">">cout<>break;case 7:exit(1);break;default:cout<"wrong>"wrong><>}}return 0;}TASK:Run the above code and display the output of list as your Data of Birth, e.g., if your DOB is 17-02-1994, then output should be:1 7 0 2 1 9 9 4Also perform deletion from front and rare of list and attach output.
TASK:
Run the above code and display the output of list as your Data of Birth, e.g., if your DOB is 17-02-1994, then output should be:1 7 0 2 1 9 9 4Also perform deletion from front and rare of list and attach output.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here