How can we pass an array directly to a function in C?
For example:
#include <stdio.h>
void function(int arr[]) {};
int main(void) {
int nums[] = {3, -11, 0, 122};
function(nums);
return 0;
}
Instead of this, can we just write something like function({3, -11, 0, 122});
?