I wrote this function:
int einmaleins(int zahl, int *arr){
int e;
for(int i = 1; i<11; i++){
e = zahl*i;
arr[i-1]=e;
}
return 0;
}
int main(){
int arr[10] = {0};
einmaleins(2, &arr[10]);
return 0;
}
The Problem is the Pointer Array but when I start the program I got the following message: *** stack smashing detected ***: terminated
I really don't know what to do.