void foo(int *pA, int *pB) { *pB = some.arr[*pA]; foo(sizeof bar / sizeof * bar, baz); }