Menu

[solved]-C 13 Given Following Program Write Code Two Functions Described Include Using Namespace S Q39029678

C++

13. Given the following program write the code for the twofunctions described below.

#include <iostream> using namespace std; int main () { constint NUMITEMS = 20; int nums[NUMITEMS] = {3, 2, 3, 3, 9, 6, 7, 5};int numItems=8;

  
// deleteNum should delete all of the occurrences // of its 3rdargument from the array and return the // number of meaningfulnumbers left in the array. For // example nums after the call belowstart // {2, 9, 6, 7, 5, …} and numItems 5 numItems =deleteNum(nums, numItems, 3);

// insertNum should insert its 3rd argument that // number of timesinto the array and return the // number of meaningful numbers inthe array. For // instance nums after the call below should start// {2, 2, 2, 9, 6, 7, 5, …} and numItems 7 // You can assumethere is enough space in the array. numItems = insertNum(nums,numItems, 2);

return 0; }

Expert Answer


Answer to C++ 13. Given the following program write the code for the two functions described below. #include using namespace std; … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *