Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimitri Papadopoulos Orfanos DimitriPapadopoulos

  • CEA
  • Université Paris-Saclay
View GitHub Profile
View TEST.c
#include <stdio.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
int main(void)
{
size_t l = ARRAY_SIZE("[xxx.xxx.xxx.xxx], ns [xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx]");
printf("ARRAY_SIZE(\"[xxx.xxx.xxx.xxx], ns [xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx]\") = %lu\n", l);
}