Exercise Objectives ✓ 2D Array / image application Problem Description Write a C function called RotateLine90. The funct

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Exercise Objectives ✓ 2D Array / image application Problem Description Write a C function called RotateLine90. The funct

Post by answerhappygod »

Exercise Objectives 2d Array Image Application Problem Description Write A C Function Called Rotateline90 The Funct 1
Exercise Objectives 2d Array Image Application Problem Description Write A C Function Called Rotateline90 The Funct 1 (70.3 KiB) Viewed 41 times
Exercise Objectives 2d Array Image Application Problem Description Write A C Function Called Rotateline90 The Funct 2
Exercise Objectives 2d Array Image Application Problem Description Write A C Function Called Rotateline90 The Funct 2 (70.3 KiB) Viewed 41 times
Exercise Objectives ✓ 2D Array / image application Problem Description Write a C function called RotateLine90. The function receives a (2D) two-dimensional array of type integer of size 5 by 5, also the function receives coordinates of line points. The function should have the following signature: void RoateLine 99.jot A[][5], int pointlx, int pointly, int point2x, int point2y) The integer array represents an image that has two colors (black and white). Each array cell of value 1 represents black color and each array cell of value represents white color. The image can have only horizontal vertical lines. Function is supposed to rotate the given line by 90 degrees counter clockwise. For example, below is an image of 5 by 5 with two horizontal lines, the left side shows the image and the right side shows the equivalent matrix of it: Page 3 of 4 01234 10 WRO 0 10 0 10 1 lo 0 1 0 0 0 1 0 o 1 lo 1 0 0 11 o 0 0 1 Calling the function RoateLine 90(A,2,2,2,4) will result in rotating the line from (2.2) thru (2,4) by 90 degrees, so it will become from (2,2) thru (0,2). The final shape should be 01234 0 o 10 0 0 0 10 10 1 1 1 10 1 0 0 10 1 0 0 0 0 1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply