ITDSIU19023 Lab 3 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

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

  1. 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

  1. 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

  1. Write a function to check whether a given array is sorted or not. Return 1 if sorted increasing, -1: decreasing, 0: not sorted
  2. 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

  • Lab3-38ii4j.zip