write an element-wise adder subroutine (arrayadder) that adds two equal-sized arrays. the size of the arrays is passed by value from the main code to the subroutine in register r2. a pointer to the first array is passed by reference in register r0. a pointer to the second array is passed by reference in register r1. the first array, pointed to by r0, should be added to the second array, pointed to by r1, and the sum is placed back in the second array. assume the data is 8-bit unsigned and implement a ceiling operation (set result to 255) on overflow (if the addition result greater than 255).

Respuesta :

Arrays are arrays if nothing else, and the size of operator can be used to determine their constant size.

However, due to the compiler behavior mentioned above as well as the implicit pointer conversion that is applied to objects of array type when it isn't intended, this is frequently neglected. And it happens frequently. However, the following are the rare cases in which implicit array object conversion is not used: Both because it is possible and because checking increases safety. Because you specified the array size in the function definition, the compiler is aware of its size. Unfortunately, this is still another remnant of the C tradition; you never pass an array; instead, it always degrades into a pointer. The array's size is no longer significant at that point.

void func ("x"); func ("char Values [4]);

Although this is currently allowed, it wouldn't be if there was a second array size check.

Learn more about array here-

https://brainly.com/question/19570024

#SPJ4