It is necessary to pass an array to the function and determine the size of the array inside the function. I try to do this:
#include <stdio.h> void pass(int buf[256]) { printf("size is %d\n", sizeof(buf)); } void main() { int buf[256]; pass(buf); }
and get when printing
size is 4
How to transfer the size of the array correctly and why, as I do, it is not transmitted?