Answer:
writing one in comments bec i don't have time for both sorry
A selection because when you decide something you select
Answer:
The solution code is written in C
- #include <stdio.h>
- int main()
- {
- const int NUM_VALS = 4;
- int courseGrades[NUM_VALS];
- int i;
-
- for (i = 0; i < NUM_VALS; ++i) {
- scanf("%d", &(courseGrades[i]));
- }
-
- /* Your solution goes here */
- for(i = 0; i < NUM_VALS; ++i){
- printf("%d ", courseGrades[i]);
- }
- printf("\n");
-
- for(i = NUM_VALS - 1; i >=0; --i){
- printf("%d ", courseGrades[i]);
- }
- printf("\n");
-
- return 0;
- }
Explanation:
The solution is highlighted in the bold font.
To print the elements forward, create a for loop to start the iteration with i = 0 (Line 14). This will enable the program to get the first element and print if out followed with a space (Line 15). The program will take the second element in the next iteration.
To print the elements backward, create a for loop to start the iteration with i = NUM_VALS - 1. The NUM_VALS - 1 will give the last index of the array and therefore the loop will start printing the last element, followed the second last and so on (Line 19 - 21).
The correct term for files copied to a secondary location for preservation purposes is backup.
<h3>What is a Backup?</h3>
This refers to the movement of files from one location to another for storage purposes.
Hence, we can see that this is done in order to preserve the files so that should the first memory location get compromised, it can be easily retrieved and this helps to prevent data loss.
Read more about backups here:
brainly.com/question/27960592
#SPJ1