1. Create and initialize an array with integers. Write a function which
will sort "even-numbered-index" values of this array using bubble sort.
Your function must take the array as an argument, perform the
"even-number-index" sort and [ modify the given array ]. Print the
end result which is array with its "even-number-index" values sorted in
ascending order and the "odd-numbered-index" in the same order as it
was originally.
Ideas on how to program this in C language?
http://cprogramming.com/
Reply:i m giving u jus algorithmic concept.
initialize and take input
int a[];
call by reference.
funcsort(*a,n);
while sorting
the loop sud be as for(i=0;i%26lt;n;i=i+2)
and sort.
Reply:try using a for loop to do that if you know how many variable are required for the arrays
Reply:Do your own homework, lol.
brenda song
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment