标签: c
C标准库中是否有类似的内容:
#define sizeofarr(a) ( sizeof(a) / sizeof(a[0]) )
答案 0 :(得分:2)
没有。 C标准库中没有类似的东西。
答案 1 :(得分:2)
不,没有这样的事情!
为了更好的宏定义,请直接检查此链接:
is-there-a-standard-function-in-c-that-would-return-the-length-of-an-array
或common-array-length-macro-for-c