Question: Write a Program in C++ take 3 functions: global varible N=0 , and int const size = 10; 1)Dynamic array in main function 2)insert function

Write a Program in C++ take 3 functions:

global varible N=0 , and int const size = 10;

1)Dynamic array in main function

2)insert function ( send array, inedx K , item of insert ) from user

But It must contain 3 conditions

1)if array is full if N=size( print value is out of range)

2)else if test of N

3)else ( if not full and k is true)

Take item and then insert to array[K], and if the array[K] has value , do it shfiting the element and increament N

3)delete function( send array , k is index of delete element ) from user and then return type int for delete value( return item)

But It must contain 3 conditions

1)if array is empty if N=0( print value is out of range)

2)else if test of N-1

3)else ( if not empty and k is true)

Take K from user(index of array) then delete the element and then eturns the value that you deleted

4)traverse fuction( Like the one below without any modification )

void traverse(){

if(isEmpty())

cout<<"The Array is empty ";

else{

for(int i=0;i<=N-1;i++)

cout<

}

cout<<" ";

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!