Question: Write in C program. An array contains both positive and negative numbers in random order. Rearrange the array elements so that all negative numbers appear
Write in C program.
An array contains both positive and negative numbers in random order. Rearrange the array elements so that all negative numbers appear before all positive numbers.
Examples : Input: -12, 11, -13, -5, 6, -7, 5, -3, -6
Output: -12 -13 -5 -7 -3 -6 11 6 5
Note: Order of elements is not important here.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
