This is what I want to do:
int randomtal(void){
int loop;
int tal[10];
srand(time(0));
for(loop = 0; loop < 10; loop++){
tal[loop] = rand() % 10+1;
}
return tal;
}
int upp1(int argc, const char * argv[]) {
int Tal[10];
Tal[] = randomtal();
return 0;
}
Simply the randomtal() function generates 10 numbers and put these in an array. I then want to pass this array to the upp1() function and put these in the Tal array. Basically make a copy of tal[] in function randomtal() and pass this to Tal in function upp1().
Tal[] = randomtal();?