Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to write the following functions in array.cpp, add function prototypes for them to array.h and invoke the functions in main.cpp. It should label

I need to write the following functions in array.cpp, add function prototypes for them to array.h and invoke the functions in main.cpp. It should label the output of your test, such as the list after insertion: etc.

?int numOfEven(int list[], int size) compute and return the number of even integers in list

? void insert(int list[], int& size, int newInt, int position) insert newInt into the list at index position and update the size of the list

Array.h

#ifndef ARRAY_H #define ARRY_H

//array.h #include #include #include using namespace std;

/* These functions are already written and can be called to test out your code */ void build(int list[], int size); //supplied void display(int list[], int size); //supplied

/* *****************YOUR TURN! ******************************** */ //Write your function prototype here:

#endif

Array.cpp

//array.cpp

#include "array.h"

//put the implementations of your assigned functions here

Main.cpp

#include "array.h"

using namespace std;

const int CAP = 100;

int main()

{

int list[CAP];

int size = 10;

build(list, size);

display(list, size);

//PLEASE PUT YOUR CODE HERE to call the function assigned

display(list, size);

return 0;

}

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago