Create an array of size 10 Assign values to the array Print the array Swap the first and last elements in the array Print the array Shift all elements by one to the right Print the array Replace even elements with 0 Replace each element except the first and last by the larger of its two neighbors Print the array Solution /*Program to replace EVEN elements by 0 and ODD elements by 1.*/ #include <stdio.h> /** funtion : readArray() input : arr ( array of integer ), size to read ONE-D integer array from standard input device (keyboard). **/ void readArray(int arr[], int size) { int i =0; printf(\"\ Enter elements : \ \"); for(i=0; i < size; i++) { printf(\"Enter arr[%d] : \",i); scanf(\"%d\",&arr[i]); } } /** funtion : printArray() input : arr ( array of integer ), size to display ONE-D integer array on standard output device (moniter). **/ void printArray(int arr[], int size) { int i =0; printf(\"\ Elements are : \"); for(i=0; i < size; i++) { printf(\"\ \\tarr[%d] : %d\",i,arr[i]); } printf(\"\ \"); } /** funtion : replaceEvenOdd() input : arr ( array of integer ), size to replace EVEN elements by 0 and ODD elements by 1. **/ void replaceEvenOdd(int arr[], int size) { int i=0; for(i=0; i < size; i++) { if( arr[i] % 2 == 0 ) arr[i] = 0 ; else arr[i] = i; } } int main() { int arr[10]; readArray(arr,10); printf(\"\ Before replacement : \"); printArray(arr,10); replaceEvenOdd(arr,10); printf(\"\ After replacement : \"); printArray(arr,10); return 0; } .