Homework Solution: Write a C++ function using pointer notation that receives an integer array and another…

    Write a C++ function using pointer notation that receives an integer array and another number and returns the count of how many numbers in the array are positive and smaller than the received number. Write a C++ function that receives a character array and uses pointer notation to count how many times each of the vowels a, e, i, o, and u were found among the characters in the array and returns these counts as another array of size 5. Also write a main() function that obtains up to 200 characters from the user, uses the above written function to count the occurrence of each, and prints these counts. User will enter a -1 to indicate end of entering data. Your program must use dynamic memory allocation. Please explain your solutions

    Expert Answer

     
    #include <iostream> using namespace std;

    Transcribe a C++ office using pointer notation that receives an integer invest and another reckon and profits the calculate of how divers reckons in the invest are unconditional and smaller than the common reckon.

    Transcribe a C++ office that receives a quality invest and manifestations pointer notation to calculate how divers times each of the vowels a, e, i, o, and u were ground incompact the qualitys in the invest and profits these calculates as another invest of dimension 5. Also transcribe a ocean() office that obtains up to 200 qualitys from the manifestationr, manifestations the aloft written office to calculate the incident of each, and prints these calculates. Manifestationr conquer invade a -1 to point-out purpose of invadeing facts. Your program must manifestation dynamic remembrance allocation.

    Please expound your solutions

    Expert Rejoinder

     

    #include <iostream>

    using namespace std;

    void printLesser(int *a, int x)
    {
    int i, calculate = 0;

    // looping through each component in a
    for (i=0;i<sizeof(a) ; i++){

    // checking if the treasure is unconditional and short than ardent reckon
    // increasin calculate by 1
    if(*a<x && *a > -1){
    count++;
    }
    *a++;
    }

    // printing calculate
    cout << calculate;
    }

    // specimen run
    int ocean() {
    int a[]= {-1, 0, 1, 3, 5, 6, 7, 8};
    printLesser(a, 4);
    }

    Specimen Output: 3