Question: Starting with the following code, follow the steps below. Please note, we're using code::blocks and the GNU GCC Compiler. #include #include int main() { system(pause)
Starting with the following code, follow the steps below. Please note, we're using code::blocks and the GNU GCC Compiler.
#include
int main() { system("pause") return 0; }
- Above main(), where appropriate, create a constant for the size of the array in step 2.
- In main(), create an array called grade using the constant from step 1 and initialize it to zero.
- Below main(), create a function called getData(), which takes and processes an array called array along with its size, and fills it with numbers given by the user. Use an array reference, not a pointer, and do NOT use a constant for this function. Also, the function does not return anything.
- In main(), call getData() passing the grade array and its size to the function.
- Below main(), create a function called displayData(), which takes and processes an array called array along with its size, and retrieves and displays the values from the array to the screen formatted professionally with decimal points aligned if appropriate. Use an array reference, not a pointer, and do NOT use a constant for this function. Also, the function does not return anything.
- In main(), call displayData() passing the grade array and its size to the function.
- In main(), using a for loop, display the data in the grade array. Do NOT use the function displayData() for this step.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
