Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a that opens a file of exactly 33 ints a. Write a function printme that pr

ID: 3652949 • Letter: W

Question

write a that opens a file of exactly 33 ints a. Write a function printme that prints the contents of an array of ints. b. Write a function oddvalues that prints just the odd ints in an array. c. Write a function oddlocations that prints the indices of the odd ints in an array. d. Write a function countodd that prints the number of odd ints in an array. e. Write a function addme that adds and prints the sum of the ints in an array. f. Write a function findsmall that prints the first index of the smallest int in an array. g. Write a function findlarge that prints the last index of the largest int in an array. h. Write a function searchme that searches and prints true if sv (search value) is in an array and false otherwise (can use a version from the book) i. Write a function sortme that sorts an array (use SelectionSort). j. Write a function binarysearch that searches and returns true if sv is in a sorted array and false otherwise ARRAY i (1, 2 or 3) a. The contents of the array are the ints:.................. b. The odd values of the array are: ................... c. The odd locations of the array are:....................... d. The number of odd numbers is:.................. e. The sum of the ints is:.................. f. The first index of the smallest int is............. g. The last index of the largest int is........... h. The value searched was .... and it was or . i. The sorted array is:................. j. The value searched in the sorted array was .......and it was or

Explanation / Answer

/* This code works for 10 emements ...you may se the index values.*/ #include#include void printme(int[10]); void oddvalues(int[10]); void oddlocation(int[10]); void countodd(int[10]); void addme(int[10]); void findsmall(int[10]); void findlarge(int[10]); void searchme(int[10],int); void sortme(int[10]); void binarysearch(int[10],int); void main() { int array[10]={4,58,23,848,2,51,98,55,11,44}; int search; int value; clrscr(); printf(" Content of the array :"); printme(array); printf(" Odd Values of the array : "); oddvalues(array); printf(" Odd Location of the array : "); oddlocation(array); printf(" Number Of odd number is : "); countodd(array); printf(" Sum of ints is :"); addme(array); printf(" The first index of the smallest int is :"); findsmall(array); printf(" The last index of the largest int is :"); findlarge(array); printf(" Enter the search value :"); scanf("%d",&search); searchme(array,search); printf(" The sorted array is :"); sortme(array); binarysearch(array,search); getch(); } void printme(int a[10]) { int i; for(i=0;i