Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include void display(int a[], int b[]); int main() { int arr_1[10], arr_2[10]={0}; printf(Enter 10 numbers for the array : ); //Enter your code here //
#includevoid display(int a[], int b[]); int main() { int arr_1[10], arr_2[10]={0}; printf("Enter 10 numbers for the array : "); //Enter your code here // display(arr_1,arr_2); return 0; } void display(int a[], int b[]) { printf(" arr_1 | arr_2 "); for(int i = 0;i Problem 2 : Write the following code in the main function of the problem_2.c file. A) Write a program that takes in 10 numbers as user input and stores it in an array(arr_1). [5] B) Then create another array(arr_2) that only stores the odd numbers from the first array(arr_1) in the reverse order. As for example: if arr_1[] = {1,2,3,4,5,6,7,8,9,10} then arr_2[] = {9,7,5,3,1}. [10] *The display has already been formatted. Change the variable names accordingly. Enter 10 numbers for the array: 1 2 3 4 5 6 7 8 9 0 arr_1 | arr_2 1 9 2 7 3 5 4 3 5 1 6 7 8 9 execution time : 9.187 s Process returned 0 (0x0) Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started