I found this blog post a bit confusing. The classic pattern sizeof(a)/sizeof(a[0]) works perfectly in C and C++. Did he claim this wasn't the case? Or maybe he tagged it as C or C++ but not both? (A much more minor sin). Or maybe something else? I found it impossible to parse.