How can I pass array to function argument?
I have this code: #include <stdio.h> void replaceIndexElement (int index, int element); int main () { replaceIndexElement(2, 3); return 0; } void replaceIndexElement (int index, int element) { int mainArr[10] = {0, 2, 1000, 6, 9, 11, 43, 8, 123, 87}; mainArr[index] = element; for (int i = 0; i < 10; i++) { printf("%d\n",… Read More How can I pass array to function argument?