Question: Write a program: using C++ a) declare int A[array_size] where array_size is an const int and initialized with 3 hint: const int array_size = 3;
Write a program: using C++
a) declare int A[array_size] where
array_size is an const int and initialized with 3
hint: const int array_size = 3;
b) write a function that takes as input an array of integers and an integer that specifics how
many entries are in the array.
Hint: void fill_array(int x[], int size)
and call the function to initialize A[] with 23, 21, 67 using cin
//passing by reference
c) call sort(A, A + array_size) to sort A in ascending order.
Hint: add #include
//passing by reference
d) display the minimum and maximum values of A[] on the screen
Hint: using cout
d) write a function that takes as input an int variable and increases the input variable by 5, and
call the function to increase the maximum value of A[] by 5
Hint: void incre(int y) {// increase y by 5}
//passing by value
e) display the maximum value of A[] on the screen after the execution of incre();
f) using a for loop to display all integers in A on screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
