implement a list data structure discussed above including following operations using array adt. get() update() length() back() next() start() end() remove() add()
Write a program in which there is a global variable, a local variable for main function and a variable in a nested scope inside main, with the same name. Print all the three variables.
Write a program to create a class ‘num’ which stores an integer number. Derive three classes from ‘num’ class namely ‘binary’, ‘octal’ and ‘hexa’ which store the binary, octal and hexadecimal equivalent of the number in ‘num’ class. Input an integer value and display its binary, octal and hexadecimal equivalent.
implement a list data structure discussed above including following operations using array adt. ◼ get() ◼ update() ◼ length() ◼ back() ◼ next() ◼ start() ◼ end() ◼ remove() ◼ add()
Experiment with the C/C++ implementations of the various sorting and searching algorithms in a
single program with time complexity:
Bubble sort
Insertion sort
Radix sort
Linear search
Binary search
Considering the following functions have been made
1)void Print_Reverse_List(List* node)
2)void Insert_Element(List** head, int data)
3)void PrinList(List* node)
4)void search_Element(List *node, int x)
5)int Length(List *node)
Your task is to create the following functions for the given code:
1)Insert_Element_at(int x)
2)bool is_Empty()
3)bool Delete_Element(int x)
4)void Empty_List()
5)void Copy_List(...)
make menu for the five functions
class List{
public:
int item;
int pos;
List* nextNode
};
List* linkList=NULL;
int ch=-1;
int number;
int position;
while(ch!=6){
cout<<"1. Insert Element\n";
cout<<"2. Print List\n";
cout<<"3. Search Element\n";
cout<<"4. Display Length of List\n";
cout<<"5. Print Reverse List\n";
cout<<"6. Exit\n";
cout<<"Your choice: ";
cin>>ch;
cout<<"\n";
switch(ch){
case 1:
}
Convert the expression into postfix notation and then verify if it is correct or not,direct answers for both 5conversion are not allowed for verification take dummy values for eachvariable.
a+b*(c/d-e)%(f+g*h)-i
what will be the output of the following code? Rough work must be done as well.
int[] values={1,3,5,7,9,11,13,15,17,19};
Stack s=new Stack();
for(int i=0;i<values.length;i++)
{
s.push(values[i]);
}
int n=25;
for(int i=0;i<4;i++)
{
n+=s.pop();
}
for(int i=0;i<2;i++)
{
n-=s.pop();
}
cout<<"\n"<<endl;