Question: Create a program in C code language that performs the following: Section 1 : A ) Reverse an array of twenty 2 - byte values

Create a program in C code language that performs the following:
Section1:
A)Reverse an array of twenty 2-byte values
B)Loop through the array and assign even numbers, starting with 2in array index 0and incrementing the values by 2for each subsequent index.
C)loop through the array from index 0to 19and print the value from each index. This must be a separate loop from step 2.
An example of output may look like this:
Array Index: 1Value: 4
Array Index: 2Value: 6
Array Index: 3Value: 8
Array Index: 4Value: 10
Array Index: 5Value: 12
Array Index: 6Value: 14
Array Index: 7Value: 16
Array Index: 8Value: 18
Array Index: 9Value: 20
Up to Array index: 19.You must have 2distinct loops in our code, one to assign values and a second one to print the values.
Section 2: Reserve an array of 154-byte values
A)Reverse an array of twenty 2-byte values uninitialized
B)Loop through the array and assign odd values, starting at 2in array index 0and incrementing the values by 2for each subsequent index
c)Loop through the array BACKWARDS from index 14to index 0and print the value. This will be a separate loop from step B.
An example of output will look like the following:
Array Index: 9Value: 21
Array Index: 8Value: 19
Array Index: 7Value: 17
Array Index: 6Value: 15
Array Index: 5Value: 13
Array Index: 4Value: 11
Array Index: 3Value: 9
Up to Array index 0and will also have 2distinct loops in code, one to assign values and a second to print values.
This must be performed in C language and ideally part 1will help solve Part 2

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 Programming Questions!