='0' && ch ungetc(ch,stdin); scanf(\"%d\",p+" />
Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to combine two arrays into one array using C language?
How to combine two arrays into one array using C language?

Code text:

#include "stdio.h"

int input(int *p,int n){

char i,ch;

for(i=0;i

if((ch=getchar())=='\n')

break;

else if(ch>='0' && ch<='9')

ungetc(ch,stdin);

scanf("%d",p+i);

}

return i;

}

int main(int argc,char *argv[]){

int a[21],b[10],i,j,k;

printf("Input array a...\ n");

i=input(a,10);

printf("and input array b...\n");

j =input(b,10);

for(k=0;k

for(j=0;j

putchar('\n');

return 0;

}