CS1412 Assignment 5: Arrays


Category: You will Instantly receive a download link for .zip solution file upon Payment


5/5 - (3 votes)

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

2. 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:
CS1412 Programming Principles II

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