passing array to function
void print_array(int arr[], size_t size, int value) { // Declaration
for (size_t i = 0; i < size; ++i)
arr[i] = value;
}
int main() {
print_array(my_array,3,100); // Call
return 0;
}
necessary to give function the size of the array!