Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

why cant I pass one arrays values to another with the program listed below: #include int array_a[10]; int array_b[10]; char temp[100]; int i = 0;

why cant I pass one arrays values to another with the program listed below:

#include  int array_a[10]; int array_b[10]; char temp[100]; int i = 0; int n = 0; int j = 0; int last; int final_array[25]; int main() { printf(" Enter up to 10 numbers for array A: "); gets(temp); while(temp[i] != '\0') { if(temp[i] != ' ') { array_a[n] = (int)(temp[i])-'0'; n++; } i++; } for(j = 0; j < n; j++) { final_array[n] = array_a[n]; } for(i = 0; i < 10; i++) { printf("%d", final_array[i]); } return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions