Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes Browsers And Databases Data Mining Tools For Integrated Genomic Databases

Authors: Peter Schattner

1st Edition

0521711320, 978-0521711326

More Books

Students also viewed these Databases questions