Question: Write a C + + program to do the following: 1 . Declare one array with five integers. 2 . Accept inputs from user to
Write a C program to do the following:
Declare one array with five integers.
Accept inputs from user to assign value to this array.
Swap the last and the second last element from this array using the following function
the declaration must be as follows:
void swapint ptr int ptr;
Display the final array.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
