Question: 8 8 / assignments / 4 9 3 5 2 7 darr Download A Alternative f Ahmed COMP 4 3 1 1 Programming Languages Homework

88/assignments/493527
darr Download
A Alternative f
Ahmed
COMP 4311 Programming Languages
Homework 1
Date Due: January 26,2024 at 11:55 PM
Using C++, write a function that reverses the order of the words in a string. For instance, your function should transform the string "Do or do not, there is no try" to "try no is there not do or Dom. Assume that all words are space delimited and treat punctuation the same as white spaces
2. Using C++define an integer array (e.g., size is 20) and a target number (e.g.50), assign the array with random numbers in (0,20), then define a function to find all unique number pairs of the array such that each pair of the numbers adds up to the target number. Print the number pairs and their original indices in the array. For example, given array A={5,3,4,2,6,7}, target =9, the number pairs are (5,4),(3,6), and (2,7). Their index info is (0,2),(1,4), and (3,5).
Handing in your assignment: Upload your individual CPP files to eCourses by the due date. Also, upload a screenshot of your console output.
 88/assignments/493527 darr Download A Alternative f Ahmed COMP 4311 Programming Languages

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!