I'm trying to write a function with any random integer that the user will enter with scanf (randomNumber)
but i keep getting errors in the middle of the program in ''arr1[&i] = x;'' and it forces it to end.Code:int randomArray(int arr1, int randomNumber) { int i, x = rand() % randomNumber; for (i = 0; i < 10; i++){ arr1[&i] = x; printf("Enter arr[%d]: %d", i, x); } return randomArray;
so what am i doing wrong or what do i need to add? thank you.