Description In this assignment I would like you write a few common pointer algorithms. You will need to write your own m

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Description In this assignment I would like you write a few common pointer algorithms. You will need to write your own m

Post by answerhappygod »

Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 1
Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 1 (36.18 KiB) Viewed 55 times
Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 2
Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 2 (41.63 KiB) Viewed 55 times
Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 3
Description In This Assignment I Would Like You Write A Few Common Pointer Algorithms You Will Need To Write Your Own M 3 (63.85 KiB) Viewed 55 times
Description In this assignment I would like you write a few common pointer algorithms. You will need to write your own main function that tests out these functions. Function 1: Returns a void • Named F1 • Takes in two pointers to integers • F1 swaps the value of the two integers Example: Start (main): a = 10 b = 20 End (main): a = 20 b = 10
Function 2: • Returns an integer • Named F2 • Takes in an integer array, and integer representing the size of the array. • Iterate through the array and if any value is less than 10, set it to 10, if any values are greater than 20, set it to 20. • Return how many changes you had to do. Example: Start arr [3, 5, 10, 15, 35, 17, 2] = size = 7 End: arr [10, 10, 10, 15, 20, 17, 10] size = 7 Function return 4
Rubric • 1 point - Comment with name, class, assignment name, and date 2 points Code neatness • 1 point - Function 1 has correct return type • 1 point Function 1 has correct parameters • 2 points - Function 1 completes task • 1 point - Function 2 has correct return type • 1 point - Function 2 has correct parameters • 1 point - Function 2 iterates through an array (think for loop) • 2 point - Function 2 changes detects if a value is less than 10 or greater than 20. 2 point Function 2 in the context of a loop it changes the array's value to 10 or 20 - • 1 point Function 2 has a counting variable for how many changes are made. • 2 points - Function 2 returns the correct value.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply