You are on page 1of 1

Students Number that ends with 1,3,5,7,9 Answers problems 1,3, 5, and 6

Students Number that ends with 0,2,4,6,8 Answers problems 2,4, 5, and 6

1. Write a pushLeft(array,size, n) procedure that pushes data elements of an array to the left. This procedure
takes array, size of array and number of push as arguments.
Example:
Array = [ 1, 2, 3, 4, 5], size = 5, n = 2
Result: Array [3, 4, 5, 1, 2]

2. Write a pushRight(array,size, n) procedure that pushes data elements of an array to the right. This procedure
takes array, size of array and number of push as arguments.
Example:
Array = [ 1, 2, 3, 4, 5], size = 5, n = 2
Result: Array [4, 5, 1, 2, 3]

3. Write a function removeOdd(array, size) that removes all odd integers in a given array.
Example:
Array = [1, 2, 3, 4, 5], size = 5
Result: Array [2, 4]

4. Write a function removeEven(array, size) that removes all even integers in a given array.
Example:
Array = [1, 2, 3, 4, 5], size = 5
Result: Array [1, 3, 5]

5. Create mergeSortArray(array1, size1, array2, size 2) method that merge two Sorted Arrays
Example:
Array1 [1, 3, 9], size1 = 3, Array2 [2, 4, 6], size =3
Result:
Array3 [1,2, 3, 4, 6, 9]

6. Write the reverse(string, len) function recursively. This function takes a string and the length of the
string as arguments and returns the same string with its characters in the reverse order.

Implement your answer on a single program by using a menu (any programming language).
Scan your handwritten answer and the executable file then submit it on my email (edmarcelo@plm.edu.ph) not
later than 1:00 PM today. BEST OF LUCK.

You might also like