Question: Write a C++ program. Programming Fundamentals (CS118) FALL 2018 Quiz # 3 Roll-No: Question: Given an integer array, called A, which contains positive integers. Write
Write a C++ program.
Programming Fundamentals (CS118) FALL 2018 Quiz # 3 Roll-No: Question: Given an integer array, called A, which contains positive integers. Write a program which reverses only the odd elements of A, in their positions. All the even elements of array A maintain their positions. For example, following is an instance of A with ten positive integers. The ones in bold are odd (i.e. 5,1,3,7,9,11). The corresponding output is given below. A (input) 5163687 10 11 9 A (output, after swapping the odd elements) 11 967 6831 105 NOTE: input output of array is not compulsory
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
