Page 1 of 1

2. Write a C program to do the following: (20 pts, 4, 8, 8) (1) Initialize two one-dimensional integer arrays, a and b,

Posted: Mon May 09, 2022 6:18 am
by answerhappygod
2 Write A C Program To Do The Following 20 Pts 4 8 8 1 Initialize Two One Dimensional Integer Arrays A And B 1
2 Write A C Program To Do The Following 20 Pts 4 8 8 1 Initialize Two One Dimensional Integer Arrays A And B 1 (38.66 KiB) Viewed 28 times
Please answer ALL parts to Question 2 please. Thanks!!
2. Write a C program to do the following: (20 pts, 4, 8, 8) (1) Initialize two one-dimensional integer arrays, a and b, each of length 10. a contains {1, 2, 5, 6, 7, 2,9, 0, 2, 5), and b contains {2, 1, 3, 6, 4, 6, 8, 8). (2) Declare a one-dimensional integer array, c, of length 10. Write a loop that assign each element of c, i.e., c, as the sum of a and b. (3) Write another loop that compares each c with 8. Display the elements in c whose values are larger than 8 to console using the following sentence: "The elements in c that exceed 8 include: "......(elements)"