Starting from:

$25

ITDSIU19023- Fundamentals Of Programming: Lab 03 Solved

From this lab onward, create one single .c file and use functions for the questions (e.g. ex01, ex02, … for the function names)
1.    Input an array of n integers. Write a function to check whether the array is symmetric or not (optional: use recursive)
Example: 1 2 3 2 1  symmetric

2.    Input an array of n integers. Sort the odd numbers in increasing order and even numbers in decreasing order
Example: array = 2 5 3 4 8 6 7 9 2  result = 8 3 5 6 4 2 7 9 2
 
3.    Input an array of n integers. Find the largest sorted sub array (sorted array increasing/decreasing and has the largest number of elements)
Example: array = 2 5 3 4 8 9 7 6 10  result = 3 4 8 or 9 7 6

4.    Write a function to check whether a given array is sorted or not. Return 1 if sorted increasing, -1: decreasing, 0: not sorted

5.    Write a function to move all positive element of an array upfront
Example: 2 -3 4 6 -7 9 8 -2  2 4 6 9 8 -3 -7 -2

More products