- Write a program to sort the elements in an array in ascending order. Take the input array from the user and use loops to sort the elements.
The desired output is:
Enter the value of N
Enter the numbers
The numbers arranged in ascending order are given below
- Write a program to find the sum of elements of an array which is equal to the target sum. You need to enter array elements and a target element from the user and find which of those elements would sum equal to the target element. You must print the index and value of those elements. The desired output is:
Enter 5 elements for the array
Enter a target element for sum
The target index is a=10 and b=4
The target index is a 1 =12 and b 2 =2
- Write a program that reverses the words in a sentence using arrays:
Enter a sentence: you can cage a swallow can’t you?
Reversal of sentence: you can’t swallow a cage can you?
Write pseudocode to solve the given problems.
Write C program to solve the above problems. Name your file Lab5_YourName.c