What is the output of the program below? #include #include using namespace std; void modifyArray(int grades [], int); void displayArray(int grades [], int, string strArg); int main() { int size = 5;...


What is the output of the program below?



#include
#include


using namespace std;


void modifyArray(int grades [], int);
void displayArray(int grades [], int, string strArg);


int main()
{
 int size = 5;
    int intArray[] = {100, 70, 80, 90, 50};


  displayArray(intArray, size, “\nBefore Modify Function”);
    modifyArray(intArray, size);
  displayArray(intArray, size, “\nAfter Modify Function”);

    return 0;
}


void modifyArray(int grades[], int size)
{
   int temp = grades[0];
   int i = 0;


   for (i = 0; i < size="" -="" 1;="">
       grades[i] = grades[i + 1];
   grades[i] = temp;

 displayArray(grades, size, “\nInside Modify Function”);
}


void displayArray(int grades[], int size, string strArg)
{
   cout < strarg=""><>
   for(int x = 0; x < size;="">
    cout < “array="" data:="" ”="">< x="">< “="”">< grades[x]=""><>
}



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here