Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are to write a function ( SumIt ) that receives three (3) parameters: an int

ID: 3540181 • Letter: Y

Question

You are to write a function (SumIt) that receives three (3) parameters: an integer array and the size of the array. The function will return the sum through the function name and the average through a third parameter passed in.

Write the statements to call the function SumIt, given the following:

           

  int tobe[100], arySize, sum, avg;


Write the prototype for the function SumIt.

In the function SumIt, how is the array parameter passed?

In the function SumIt, how is the arySize parameter passed?

In the function SumIt, how is the third parameter (avg) passed?


You are giving the following input data for the code below:

            10, 5b7.6,23                            %u2026..input data where the b/// represents a blank

           

            int n1, n2;   float n3;

            char k1, k2, k3;

            %u2026.

            cin >> n1;

            cin >> k1 >> k2;

            cin >> n2;

            cin.get(k3);

            cout << n1 << %u201C %u201C << n2 << %u201C %u201C << k1 << %u201C %u201C << k2 << %u201C %u201C << k3 << endl;

What prints out for the above?

I need to do a simulation for a local manufacturing company. I need an array that will hold 100 values per row with 25 rows. The array is to be initialized to random values between 10 and 40.Write the code to define an array as described above.

Write the code to fill the array with the values as described above.


You are given the following declaration.

           

                        class OneTwo

                        { public:

                               int             val

                               OneTwo * link;

                        };

                        OneTwo *head, *c, *p;

In general what data structure are we defining for OneTwo? (the answer is not a class or struct)



Write the code to print out all the values in the structure above. Assume data has been added to the data structure and head is the beginning.



Given the following code below, add to the code below that will put the new value read in (value) at the end of the data structure above.

                        int value;

                        cin >> value;

In a link list, what do we call the entities that are linked together? (generic term)

What is unique about the %u201Chead%u201D variable in the previous question?

You are given the following arrays n[20] and ans[20] and there is a 19 digit number stored in the array n, one digit per array location, right hand justified and in binary (not character form). Write the code to multiply the 19 digit number by 8 (a single digit number) and put the answer in ans, one digit per location. Define any other variables you need.

In programming we have a feature called Recursion.


List the three characteristic you must have to develop a recursive function.


Given the following code, what will print out?

                        int Woe( int n)

                        { if ( n==0 )

                                    return 0;

                        else

                                    return 1 + Woe( n / 10);

                        }

                        int main()

                        {          int i;

                                    int d = 84132;

                                    cout << Woe(d) << endl;

                        }


Given any value (ex 4 or 82929 or 877 or 0) for the variable %u2018d%u2019 in Woe(d) above, what wie above routine print out? (In general, what does the above function compute?)

Explanation / Answer


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote