Q 1) Is there a way of finding the number of array elements inside the function?Code:typedef struct stA { int a,b; }; main() { stA elems[] = {{10,10},{20,20},{30,30}}; func(elems); } void func(stA *arr) { cout << arr[0].a << endl; }
Q 2) Is there a way of passing the elements of array in the function call itself? Something like: func({{10,10},{20,20},{30,30}}
Thanks