How do I join two vectors A [10] and B [10] to create a vector C with 20 elements.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main(){
int a[10];
int b[10];
int c[20];
int i;
srand(time(NULL));
for(i = 0; i < 10; i++){
a[i] = rand()%101;
}
for(i = 0; i < 10; i++){
b[i] = rand()%101;
}
for(i = 0; i < 20; i++){
c[i] = rand()%101;
}
printf("%d\n" a[i]);
printf("%d\n" b[i]);
printf("%d\n" c[i]);
}
For now I'm trying to print the 3 but it's already giving error