by teo_zero · 2y ago · 0 comments
int get(int n, char buf[n])
{
return buf[10];
}
It's if you want to use sizeof that you need a pointer to array. But if you have n, why would you need to query the size of your array?Changing the n later has no impact on the size of the arrays later and the compiler is perfectly able to remember the original size.